8.6high
File disclosure in Express Handlebars
- Severity
- 8.6high CVSS:3.1 by NVD
- Exploit likelihood
- 17.5% (higher than 97% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fr76-2wp8-fp92BIT-HANDLEBARS-2021-32820
Description
Express-handlebars is a Handlebars view engine for Express. Express-handlebars mixes pure template data with engine configuration options through the Express render API. More specifically, the layout parameter may trigger file disclosure vulnerabilities in downstream applications. This potential vulnerability is somewhat restricted in that only files with existing extentions (i.e. file.extension) can be included, files that lack an extension will have .handlebars appended to them. For complete details refer to the referenced GHSL-2021-018 report. Notes in documentation have been added to help users avoid this potential information exposure vulnerability.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| express-handlebars express-handlebars | <= 5.3.2 | CVE List |
| express-handlebars (npm) | before 5.3.1 | GitHub Advisory Database |
| express_handlebars_project express_handlebars | up to 5.3.2 | NVD |
| handlebars (Bitnami) | before 5.3.3 | Bitnami Vulnerability Database |
All scores
| GitHub | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
| NVD | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| Bitnami Vulnerability Database | high rating |
Classification
What each source says
CVE List
Express-handlebars is a Handlebars view engine for Express. Express-handlebars mixes pure template data with engine configuration options through the Express render API. More specifically, the layout parameter may trigger file disclosure vulnerabilities in downstream applications. This potential vulnerability is somewhat restricted in that only files with existing extentions (i.e. file.extension) can be included, files that lack an extension will have .handlebars appended to them. For complete details refer to the referenced GHSL-2021-018 report. Notes in documentation have been added to help users avoid this potential information exposure vulnerability.
GitHub Advisory Database
Express-handlebars is a Handlebars view engine for Express. Express-handlebars mixes pure template data with engine configuration options through the Express render API. More specifically, the layout parameter may trigger file disclosure vulnerabilities in downstream applications. This potential vulnerability is somewhat restricted in that only files with existing extentions (i.e. file.extension) can be included, files that lack an extension will have .handlebars appended to them. For complete details refer to the referenced GHSL-2021-018 report. Notes in documentation have been added to help users avoid this potential information exposure vulnerability.
A fix is discussed in https://github.com/express-handlebars/express-handlebars/pull/163
NVD (es)
Express-handlebars es un motor de visualización handlebars para Express. Express-handlebars mezcla datos de plantilla puros con opciones de configuración del motor mediante la API de renderizado Express. Más específicamente, el parámetro layout puede desencadenar vulnerabilidades de divulgación de archivos en aplicaciones posteriores. Esta vulnerabilidad potencial está algo restringida en el sentido de que solo pueden ser incluidos archivos con extensiones existentes (es decir, file.extension), los archivos que carecen de extensión tendrán .handlebars adjuntos. Para obtener detalles completos, consulte el reporte GHSL-2021-018 al que se hace referencia. Se han agregado notas en una documentación para ayudar a usuarios a evitar esta potencial vulnerabilidad de exposición de información
References
| https://securitylab.github.com/advisories/GHSL-2021-018-express-handlebars/ | advisory, exploit, third-party-advisory | |
| https://www.npmjs.com/package/express-handlebars | advisory, third-party-advisory, web | |
| https://github.com/express-handlebars/express-handlebars/pull/163 | advisory, exploit, third-party-advisory, web | |
| https://github.com/express-handlebars/express-handlebars/commit/78c47a235c4ad7bc2674bddd8ec2721567ed8c72 | advisory, patch, third-party-advisory, web | |
| https://github.com/express-handlebars/express-handlebars/blob/78c47a235c4ad7bc2674bddd8ec2721567ed8c72/README.md#danger- | advisory, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-32820 | advisory, web | |
| https://github.com/express-handlebars/express-handlebars#danger- | web | |
| https://securitylab.github.com/advisories/GHSL-2021-018-express-handlebars | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32820 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fr76-2wp8-fp92 changed 2023-12-06 | CC-BY-4.0 |
| NVD | CVE-2021-32820 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-HANDLEBARS-2021-32820 changed 2026-09-08 | Apache-2.0 |