CVE-2021-32822: hbs_project hbs
Vulnerability summary
CVE-2021-32822 is a medium (CVSS 5.3) vulnerability in hbs_project hbs. EPSS estimates a 1.13% chance of exploitation in the next 30 days, higher than 66.1% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 16-08-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 3 sources · 2 versions- CVE.orgCNA4.0MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:NDiffers
- OSV · NpmEcosystem advisory · calculated4.0MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:NDiffers
EPSS trend
Probability
1.13%
Chance of exploitation in the next 30 days
Percentile
66%
Versus all other CVEs
30-day change
-0.05 pp
From 1.18% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundGhsl 2021 020 Pillarjs Hbs
Maturity: poc
Weaknesses
CWE · root cause- CWE-538Insertion of Sensitive Information into Externally-Accessible File or DirectoryThe product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.
- CWE-94Improper Control of Generation of Code ('Code Injection')The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Affected systems
3 vendors · 3 products
References
4 links- securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/X Refsource CONFIRMExploitThird Party Advisory
- github.com/pillarjs/hbsPACKAGE