ejs@3.1.6 vulnerabilities

Embedded JavaScript templates

Direct Vulnerabilities

Known vulnerabilities in the ejs package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Remote Code Execution (RCE)

ejs is a popular JavaScript templating engine.

Affected versions of this package are vulnerable to Remote Code Execution (RCE) by passing an unrestricted render option via the view options parameter of renderFile, which makes it possible to inject code into outputFunctionName.

Note: This vulnerability is exploitable only if the server is already vulnerable to Prototype Pollution.

How to fix Remote Code Execution (RCE)?

Upgrade ejs to version 3.1.7 or higher.

<3.1.7