CVE-2021-32820
File disclosure in Express Handlebars
Record summary
CVE-2021-32820 has a selected CVSS score of 8.6 (high); EIP currently links 1 Nuclei template.
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.
Exploitation context
Available material
- Nuclei templates
- 1
Affected products and versions
2| Product | Source | Version range | Status |
|---|---|---|---|
express-handlebarsBrowse express-handlebars / express-handlebars | CVE List | <= 5.3.2 | affected |
express-handlebarsBrowse npm / express-handlebars | GitHub Advisory | Before 5.3.1 · Fixed in 5.3.1 | affected |
Nuclei templates
1ProjectDiscoveryHIGHExpress-handlebars - Local File InclusionCVSS 8.6
Express-handlebars is susceptible to local file inclusion because it 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 extensions (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.
Impact
An attacker can exploit this vulnerability to read arbitrary files on the server, potentially leading to unauthorized access or sensitive information disclosure.
Remediation
Update to the latest version of Express-handlebars to mitigate the vulnerability.
Source: ProjectDiscovery