CVE-2024-33883:
ejs lacks certain pollution protection
4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.78524%
CWE
Published
4/28/2024
Updated
8/2/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
ejs | npm | < 3.1.10 | 3.1.10 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how options were handled in the Template constructor before the patch. The commit introduced utils.hasOwnOnlyObject() to filter out prototype properties, replacing the vulnerable pattern. The pre-patch code in lib/ejs.js line 506-510 directly used the input 'opts' without checking for own properties, making it susceptible to prototype pollution via malicious option objects. The CWE-1321 (Prototype Pollution) mapping confirms this pattern matches prototype pollution vectors.