# CVE-2021-32822: File disclosure in hbs

- Severity: Medium 4.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.98%, higher than 63% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-08-16T18:45:10.000Z
- Modified: 2026-10-27T16:15:05.322Z
- Also known as: GHSA-7f5c-rpf4-86p8
- Weaknesses: CWE-94, CWE-200, CWE-538
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- pillarjs hbs: all
- hbs (npm): up to 4.4.0
- hbs_project hbs: no versions given

## Every score

- GitHub_M: CVSS:3.1 4.0 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N`
- GitHub: CVSS:3.1 4.0 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/> (exploit, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32822> (advisory)
- <https://github.com/pillarjs/hbs> (package)
- <https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs> (advisory)

## Sources

- CVE List: [CVE-2021-32822](https://www.cve.org/CVERecord?id=CVE-2021-32822), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-7f5c-rpf4-86p8](https://github.com/advisories/GHSA-7f5c-rpf4-86p8), CC-BY-4.0, modified 2026-10-27
- NVD: [CVE-2021-32822](https://nvd.nist.gov/vuln/detail/CVE-2021-32822), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-32822 · Whole record: https://cve.day/CVE-2021-32822.json · Rebuilt by cve.day 2026-11-25T22:58:03.261Z
