🔙 목록으로 돌아가기

CVE-2021-32820: Express-handlebars - Local File Inclusion

TitleExpress-handlebars - Local File Inclusion
AuthordhiyaneshDk
SeverityHigh
ImpactAn attacker can exploit this vulnerability to read arbitrary files on the server, potentially leading to unauthorized access or sensitive information disclosure.
RemediationUpdate to the latest version of Express-handlebars to mitigate the vulnerability.
CVSS Score8.6
EPSS Score0.90956
CVE IDCVE-2021-32820
CWE IDCWE-94,CWE-200
Tags cve2021 cve expressjs lfi xxe express_handlebars_project node.js vuln

🔍 Vulnerability 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.

🌐 HTTP Request

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

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-32820.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-32820.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A