CVE-2021-4245: npm package rfc6902 vulnerable to Prototype Pollution
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.58881%
CWE
Published
12/15/2022
Updated
1/25/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 |
|---|---|---|---|
| rfc6902 | npm | < 5.0.0 | 5.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the token-processing loop in Pointer's implementation. The pre-patch code in pointer.ts iterated through path tokens and directly assigned values using value = (parent || {})[key] without checking for dangerous keys. The patch adds a guard clause to skip proto/constructor/prototype keys, confirming this was the injection point. The evaluate method (implied by the token traversal logic) is responsible for resolving JSON pointers, making it the logical location for this prototype pollution vulnerability.