CVE-2020-7766 Prototype Pollution
Prototype pollution in json-ptr allows attackers to modify object prototypes when the force flag is enabled, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-7766?
CVE-2020-7766 is a high-severity vulnerability in json-ptr, published on 10 Nov 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-1321
Which versions are affected by CVE-2020-7766?
2 open source packages ship an affected version, including json-ptr. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
json-ptr npm | All versions | 2.1.0 |
json-ptr npm | All versions | 2.1.0 |
Products include Json-Ptr Project Json-Ptr.
How do I fix CVE-2020-7766?
Upgrade json-ptr to 2.1.0 or later.
Is CVE-2020-7766 being exploited?
There is no known exploitation of CVE-2020-7766 in the wild and no public exploit code.
Other vulnerabilities in json-ptr
Sources
Also known as GHSA-x5r6-x823-9848.