Insecure template handling in Express-handlebars

Overview

Source
ID
GHSA-fr76-2wp8-fp92
Aliases
BIT-handlebars-2021-32820
CVE-2021-32820
Affected package

Description

Express-handlebars is a Handlebars view engine for Express. Express-handlebars mixes pure template data with engine configuration options through the Express render API. More specifically, the layout parameter may trigger file disclosure vulnerabilities in downstream applications. This potential vulnerability is somewhat restricted in that only files with existing extentions (i.e. file.extension) can be included, files that lack an extension will have `.handlebars` appended to them. For complete details refer to the referenced GHSL-2021-018 report. Notes in documentation have been added to help users avoid this potential information exposure vulnerability.

A fix is discussed in https://github.com/express-handlebars/express-handlebars/pull/163

Summary

817
Total packages affected
Packages with at least one version that is affected by the advisory or has an affected dependency.
149
Packages with a known fix
Packages with versions affected by the advisory that have a greater version that is not affected.
<0.01%
Total ecosystem affected
The proportion of packages in the ecosystem that are affected by the advisory (fixed or not).
Affected Version: Introduced: 0, Fixed: 5.3.1
Patched/Unaffected
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
6.0.0
6.0.1
6.0.2
6.0.3
6.0.4
6.0.5
6.0.6
6.0.7
7.0.0
7.0.1
7.0.2
7.0.3
7.0.4
7.0.5
7.0.6
7.0.7
7.1.0
7.1.1
7.1.2
7.1.3
8.0.0
8.0.1
8.0.2
8.0.3
Affected
5.3.0
5.2.1
5.2.0
5.1.0
5.0.0
4.0.6
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.1.0
3.0.2
3.0.1
3.0.0
2.0.1
2.0.0
1.2.2
1.2.1
1.2.0
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-rc-2
1.0.0-rc-1
0.0.2
0.0.1