Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. hbs
  4. ›
  5. CVE-2021-32822

CVE-2021-32822: hbs: Insertion of Sensitive Information into Externally-Accessible File or Directory and Exposure of Sensitive Information to an Unauthorized Actor

September 2, 2021 (updated October 27, 2026)

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.

References

  • github.com/advisories/GHSA-7f5c-rpf4-86p8
  • nvd.nist.gov/vuln/detail/CVE-2021-32822
  • securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs

Code Behaviors & Features

Detect and mitigate CVE-2021-32822 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 4.4.0

Solution

Unfortunately, there is no solution available yet.

Impact 4 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/hbs/CVE-2021-32822.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:45 +0000.