CVE-2021-25944: deep-defaults vulnerable to prototype pollution
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.84812%
CWE
Published
5/24/2022
Updated
4/22/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| deep-defaults | npm | >= 1.0.0, <= 1.0.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability documentation explicitly identifies _deepDefaults as the vulnerable function. The function's implementation (visible in lib/index.js) shows it uses _.each to copy properties from src to dest without: 1) validating if the property key is proto or other sensitive prototype properties, 2) checking if properties belong to the object's own properties using hasOwnProperty or equivalent. This allows prototype pollution via malicious src input containing proto payloads, as demonstrated in the PoC. The confidence is high as the analysis matches both the vulnerability description and the actual code implementation.