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 package | Versions | Reported by |
|---|---|---|
| pillarjs hbs | all | CVE List |
| hbs (npm) | up to 4.4.0 | GitHub Advisory Database |
| hbs_project hbs | Not specified | NVD |
All scores
| GitHub_M | 4.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N |
| GitHub | 4.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV: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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32822 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7f5c-rpf4-86p8 changed 2026-10-27 | CC-BY-4.0 |
| NVD | CVE-2021-32822 changed 2026-06-17 | Public domain |