VYPR
Moderate severityNVD Advisory· Published Nov 3, 2021· Updated Sep 16, 2024

Prototype Pollution

CVE-2021-23509

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.

PackageAffected versionsPatched versions
json-ptrnpm
< 3.0.03.0.0

Affected products

2

Patches

1

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

6

News mentions

0

No linked articles in our index yet.