CVE-2022-29078

ejs: server-side template injection in outputFunctionName

Published Apr 25, 2022 CVSS 3.1 · 9.8 Critical EPSS 32.8% KEV · Not listed
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).

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-phwq-j96m-2c2q ejs template injection vulnerability
History

No history.

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-77

    Improper Neutralization of Special Elements used in a Command ('Command Injection')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Aug 3, 2024, 6:10 AM
Reserved
Apr 12, 2022, 12:00 AM
Status
Modified
Published
Apr 25, 2022, 3:15 PM
Modified
Jun 17, 2026, 4:39 AM
Severity
Important
Public date
Apr 25, 2022, 12:00 AM