CVE-2021-23434: Prototype Pollution in object-path
5.6
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.20222%
CWE
Published
9/1/2021
Updated
9/8/2023
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 |
---|---|---|---|
object-path | npm | < 0.11.6 | 0.11.6 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the set function's path component handling. The commit adds a type check and string conversion for 'currentPath', addressing a scenario where array-based path components (e.g., [['proto']]) would bypass prototype pollution checks. The === comparison between array elements (object) and string 'proto' always returns false, allowing unsafe property assignment. The test cases added in test.js explicitly validate this fix by attempting to set properties via array paths containing 'proto'.