CVE-2020-7766 json
Prototype Pollution
published 5y ago modified 4mo ago also GHSA-x5r6-x823-9848 , EUVD-2021-1228
- cvss
- 7.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.9%
- EPSS 1.9% chance of exploitation in 30 days, percentile 79%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm json-ptr 2.1.0
- json-ptr_project json-ptr 2.0.0
- github.com/flitbit/json-ptr@2539e34 commit
- github.com/418sec/json-ptr#3 pull request
Is CVE-2020-7766 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerExploit prediction
1.90% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.3 | 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 |
| CNA | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | json-ptr | <2.1.0 |
2.1.0 |
Affected products
- n/a json-ptr
Classification
References
-
github.com
/418sec/json-ptr/pull/3
web
-
github.com
/flitbit/json-ptr/commit/2539e3494c80af1eef24f0f433654a61f255f011
web
-
snyk.io
/vuln/SNYK-JS-JSONPTR-1016939
web, exploit, third-party-advisory
-
snyk.io
/vuln/SNYK-JAVA-ORGWEBJARSNPM-1038396
web, exploit, third-party-advisory
-
github.com
/flitbit/json-ptr/blob/master/src/util.ts%23L174
web, broken-link
-
nvd.nist.gov
/vuln/detail/CVE-2020-7766
advisory
-
huntr.dev
/bounties/2-npm-json-ptr
web
-
npmjs.com
/package/json-ptr
web
Sources
- CVE List CVE-2020-7766
- GitHub Advisory GHSA-x5r6-x823-9848
- NVD CVE-2020-7766
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.