CVE-2020-7766
CRITICAL 9.8CVSS 3.1Arbitrary Code Execution in json-ptr
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.
- Published
- 10 Nov 2020
- Last modified
- 17 Jun 2026
- Assigned by
- report@snyk.io
- NVD status
- Modified
- Weakness
- CWE-1321CWE-400CWE-74
- Also known as
- GHSA-x5r6-x823-9848
- Sources
- NVDJSONOSV GHSA-x5r6-x823-9848JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | report@snyk.io (Secondary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | json-ptr_project | json-ptrcpe:2.3:a:json-ptr_project:json-ptr:*:*:*:*:*:*:*:* |
< 2.0.0 | 2.0.0 |
| OSV | npm | json-ptr | < 2.1.0 | 2.1.0 |
References
- https://github.com/flitbit/json-ptr/blob/master/src/util.ts%23L174 · Broken Link, WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1038396 · Exploit, Third Party Advisory, WEB
- https://snyk.io/vuln/SNYK-JS-JSONPTR-1016939 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2020-7766 · ADVISORY
- https://github.com/418sec/json-ptr/pull/3 · WEB
- https://github.com/flitbit/json-ptr/commit/2539e3494c80af1eef24f0f433654a61f255f011 · WEB
- https://www.huntr.dev/bounties/2-npm-json-ptr · WEB
- https://www.npmjs.com/package/json-ptr · WEB
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 10 Nov 2020)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 May 2021)