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.
Remediation
References
https://securitylab.github.com/advisories/GHSL-2021-020-pillarjs-hbs/
Related Vulnerabilities
CVE-2022-31179 Vulnerability in npm package shescape
CVE-2021-43786 Vulnerability in npm package nodebb
CVE-2021-46089 Vulnerability in maven package org.jeecgframework.boot:jeecg-boot-base-core
CVE-2020-8127 Vulnerability in maven package org.webjars:reveal.js
CVE-2022-35915 Vulnerability in maven package org.webjars.npm:openzeppelin__contracts-upgradeable