# CVE-2021-23820: json-pointer prototype pollution vulnerability

Source: https://junglewise.ai/threats/cve-2021-23820-json-pointer-prototype-pollution-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-11-08. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2021-23820 · Severity: low · CVSS 3.1 · Published 2021-11-08

json-pointer is a JavaScript library used to parse and resolve JSON Pointer references in JSON documents. A prototype pollution vulnerability in versions up to 0.6.1 allows attackers to bypass security fixes by exploiting a type confusion issue when pointer components are arrays, potentially leading to object property injection and application logic manipulation.

Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-23820 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-23820 being exploited in the wild.

**How severe is CVE-2021-23820?** Low severity, with a CVSS score of 3.1, published 8 November 2021.

**Which products and versions are affected?** json-pointer (npm) SEMVER:introduced=0,fixed=0.6.2.

**Is there a fix for CVE-2021-23820?** Yes. json-pointer (npm): upgrade to 0.6.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-23820 attacked?** It is attacked over the network.

**Am I affected by CVE-2021-23820?** Check whether you run json-pointer (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- json-pointer (npm): upgrade to 0.6.2 or later

  ```sh
  npm install json-pointer@0.6.2
  ```


## Technical details

This is a prototype pollution vulnerability (CWE-1321, CWE-843) affecting json-pointer versions ≤0.6.1 that stems from inadequate type checking when processing pointer components. The vulnerability represents a bypass of the previous CVE-2020-7709 fix by exploiting a type confusion condition: when pointer components are arrays rather than strings or numbers, the vulnerable code fails to properly sanitize property names like "__proto__", "constructor", or "prototype". An attacker can craft malicious JSON pointers to inject properties into Object.prototype, potentially compromising the integrity of any object created or processed by the application. The attack requires network access but no authentication or user interaction. The fix was released in version 0.6.2 on February 17, 2022.

## Affected products

- npm json-pointer 0 to 0.6.1

## Identifiers

- CVE-2021-23820
- GHSA-v5vg-g7rq-363w

## Timeline

- 2021-11-08: disclosed: GHSA advisory published
- 2021-11-03: advisory: NVD entry published
- 2022-02-17: patched: Fix merged in version 0.6.2

## References

- [https://github.com/manuelstofer/json-pointer/pull/36](https://github.com/manuelstofer/json-pointer/pull/36)

## Related threats

- [json-pointer prototype pollution](https://junglewise.ai/threats/cve-2022-4742-json-pointer-prototype-pollution)
