GitHub Advisoryadvisory · npm

GHSA-7f5c-rpf4-86p8 hbs: Insertion of Sensitive Information into Externally-Accessible File or Directory and Exposure of Sensitive Information to an Unauthorized Actor

MEDIUM Published 2021-09-02 Modified 2026-10-27 Official page ↗
Aliases
CVE-2021-32822
Ecosystem
npm
Packages
hbs
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N
Weaknesses
CWE-200, CWE-538, CWE-94
Reviewed
2021-08-26

Affected packages

• npm hbs: <= 4.4.0 (no fix yet)

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.

Related

Alias · CVE (1)

  • CVE-2021-32822 The npm hbs package is an Express view engine wrapper for Handlebars. vulnerability

Weakness · CWE (3)

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

References