CVE-2021-32822 Details
Description
The npm hbs package is an Express view engine wrapper for Handlebars. Depending on usage, users of hbs may be vulnerable to a file disclosure vulnerability. There is currently no patch for this vulnerability. hbs mixes pure template data with engine configuration options through the Express render API. By overwriting internal configuration options a file disclosure vulnerability may be triggered in downstream applications. For an example PoC see the referenced GHSL-2021-020.
A file disclosure vulnerability has been identified in the npm hbs package, which serves as an Express view engine wrapper for Handlebars. This vulnerability arises from the improper mixing of template data and engine configuration options through the Express render API. When internal configuration options are overwritten, it may trigger file disclosure in downstream applications. The issue is present in hbs version 4.1.1.
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.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/ | CVE | ExploitThird Party Advisory |
| https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/ | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
| CWE-538 | Insertion of Sensitive Information into Externally-Accessible File or Directory | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| hbs project hbs | All versions |
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] |
| Aug 24, 2021 | Initial Analysis | [email protected] |