CVE-2021-23807: Prototype Pollution in node-jsonpointer
5.6
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.27242%
CWE
Published
11/8/2021
Updated
3/5/2025
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
jsonpointer | npm | < 5.0.0 | 5.0.0 |
org.webjars.npm:json-pointer | npm | < 5.0.0 | 5.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key issues: 1) In setter, the prototype pollution guard only checked fixed positions in the pointer array (indexes 1 and 2), failing to handle multi-segment paths and array-based components. 2) In compilePointer, the lack of type validation for array elements allowed attackers to use nested arrays as pointer components, causing type mismatches (array vs string) that bypassed security checks. The patch added iterative checks for dangerous properties in all pointer positions and strict type validation for pointer components, confirming these functions were the attack surface.