CVE-2021-32820 Details
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 file disclosure vulnerability has been identified in the Express Handlebars view engine, specifically in versions prior to 5.3.1. This vulnerability arises from the improper mixing of template data and engine configuration options through the Express render API. The issue allows for the inclusion of arbitrary files via the layout parameter, potentially leading to unauthorized information exposure. Notably, only files with existing extensions can be accessed, as files lacking an extension will have '.handlebars' appended.
Users are advised to update to Express Handlebars version 5.3.1 or later, where this vulnerability has been addressed. Additionally, review application code to ensure that user-controlled data is not passed directly into the render function without proper validation.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
| CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| express handlebars project express handlebars | <= 5.3.2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Jul 2, 2022 | Reanalysis | [email protected] |
| May 20, 2021 | Initial Analysis | [email protected] |