Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Informational severity, with a CVSS score of 8.6, published 26 May 2021.
- Which products and versions are affected?
- json-ptr (npm) SEMVER:introduced=0,fixed=2.1.0.
- Is there a fix for This vulnerability?
- Yes. json-ptr (npm): upgrade to 2.1.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network.
- Am I affected?
- Check whether you run json-ptr (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-ptr (npm): upgrade to 2.1.0 or later
npm install json-ptr@2.1.0
Technical details
This is an code injection vulnerability (CWE-74) in json-ptr versions prior to v2.1.0, specifically in the .get() method. The vulnerability stems from insufficient input sanitization when processing user-supplied pointer locations; attackers can break out of the intended expression context by injecting single quotes and additional code. An attacker who can control the pointer parameter passed to .get() (for example, via HTTP requests) can achieve arbitrary code execution. The fix, released in v2.1.0, implements proper escaping of single quotes and backslashes in the pointer path.
Affected products
- flitbit json-ptr prior to v2.1.0
Timeline
- 2021-05-26: disclosed
- 2021-05-26: patched: v2.1.0 released with security fix