Prototype Pollution
Description
json-ptr before 3.0.0 allows prototype pollution via arrays in pointer keys, bypassing a previous fix.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
json-ptr before 3.0.0 allows prototype pollution via arrays in pointer keys, bypassing a previous fix.
Vulnerability
The json-ptr package versions before 3.0.0 are vulnerable to a type confusion issue when user-provided keys in the pointer parameter are arrays. This allows an attacker to bypass the fix for CVE-2020-7766, which addressed prototype pollution via string-based pointers. The vulnerability occurs because the library does not properly handle array-type keys, enabling pollution of Object.prototype. [1][2]
Exploitation
An attacker can supply a crafted pointer containing array keys to the json-ptr API. No authentication or special network position is required if the application processes user-controlled pointer values. The attacker provides a pointer such as ['__proto__', 'polluted'] to set a property on the prototype. [2]
Impact
Successful exploitation leads to prototype pollution, which can result in denial of service, property injection, or potentially remote code execution depending on the application's use of the polluted properties. The attacker can inject arbitrary properties into the global object prototype, affecting all objects. [2]
Mitigation
Upgrade to json-ptr version 3.0.0 or later, which fixes the type confusion and properly validates pointer keys. No workaround is available for earlier versions. [1][2]
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
json-ptrnpm | < 3.0.0 | 3.0.0 |
Affected products
2- json-ptr/json-ptrdescription
Patches
15dc458fbad1cVulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
6- github.com/advisories/GHSA-8gwj-8hxc-285wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-23509ghsaADVISORY
- github.com/flitbit/json-ptr/commit/5dc458fbad1c382a2e3ca6d62e66ede3d92849caghsax_refsource_MISCWEB
- github.com/flitbit/json-ptr/pull/42ghsax_refsource_MISCWEB
- snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1767165mitrex_refsource_MISC
- snyk.io/vuln/SNYK-JS-JSONPTR-1577291ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.