org.webjars.npm:ejs@2.6.1 vulnerabilities

Direct Vulnerabilities

Known vulnerabilities in the org.webjars.npm: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
  • M
Improper Control of Dynamically-Managed Code Resources

org.webjars.npm:ejs is a popular JavaScript templating engine.

Affected versions of this package are vulnerable to Improper Control of Dynamically-Managed Code Resources due to the lack of certain pollution protection mechanisms. An attacker can exploit this vulnerability to manipulate object properties that should not be accessible or modifiable.

Note:

Even after updating to the fix version that adds enhanced protection against prototype pollution, it is still possible to override the hasOwnProperty method.

How to fix Improper Control of Dynamically-Managed Code Resources?

A fix was pushed into the master branch but not yet published.

[0,)
  • H
Remote Code Execution (RCE)

org.webjars.npm: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 org.webjars.npm:ejs to version 3.1.8 or higher.

[,3.1.8)
  • M
Arbitrary Code Injection

org.webjars.npm:ejs is a popular JavaScript templating engine.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the render and renderFile. If external input is flowing into the options parameter, an attacker is able run arbitrary code. This include the filename, compileDebug, and client option.

How to fix Arbitrary Code Injection?

Upgrade org.webjars.npm:ejs to version 3.1.6 or higher.

[,3.1.6)