Improper Control of Dynamically-Managed Code Resources Affecting ejs package, versions <3.1.10


0.0
medium

Snyk CVSS

    Attack Complexity Low

    Threat Intelligence

    EPSS 0.04% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-EJS-6689533
  • published 29 Apr 2024
  • disclosed 28 Apr 2024
  • credit Unknown

How to fix?

Upgrade ejs to version 3.1.10 or higher.

Overview

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.

References