CVE-2021-32822
JSON

4.0medium

File disclosure in hbs

Severity
4.0medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.98% (higher than 63% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-7f5c-rpf4-86p8

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.

Affected

Product or packageVersionsReported by
pillarjs hbsallCVE List
hbs (npm)up to 4.4.0GitHub Advisory Database
hbs_project hbsNot specifiedNVD

All scores

GitHub_M4.0medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N
GitHub4.0medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N

Classification

What each source says

CVE List

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.

NVD (es)

El paquete npm hbs es una envoltura del motor de visualización Express para Handlebars. Dependiendo del uso, los usuarios de hbs pueden ser vulnerables a una vulnerabilidad de divulgación de archivos. Actualmente no se presenta ningún parche para esta vulnerabilidad. hbs mezcla datos puros de plantillas con opciones de configuración del motor mediante la API de renderizado Express. Al sobrescribir las opciones de configuración internas, se puede desencadenar una vulnerabilidad de divulgación de archivos en las aplicaciones posteriores. Para un ejemplo de PoC vea el GHSL-2021-020 referenciado.

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32822 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-7f5c-rpf4-86p8 changed 2026-10-27CC-BY-4.0
NVDCVE-2021-32822 changed 2026-06-17Public domain