# CVE-2021-42836: GO-2021-0265 - Denial of service via maliciously crafted path in github.com/tidwall/gjson

Source: https://junglewise.ai/threats/cve-2021-42248-duplicate-advisory-redos-via-crafted-json-input-in-gjson  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-08-15  
License: CC BY 4.0 with a link back

CVE-2021-42836 · Severity: low · CVSS 3.1 · Published 2022-08-15

Denial of service via maliciously crafted path in github.com/tidwall/gjson

Technologies: [github.com/tidwall/gjson (Go)](https://junglewise.ai/threats/technologies/github-com-tidwall-gjson). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2021-42836 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-42836 being exploited in the wild.

**How severe is CVE-2021-42836?** Low severity, with a CVSS score of 3.1, published 15 August 2022.

**Which products and versions are affected?** github.com/tidwall/gjson (Go) SEMVER:introduced=0,fixed=1.9.3.

**Is there a fix for CVE-2021-42836?** Yes. github.com/tidwall/gjson (Go): upgrade to 1.9.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-42836?** Check whether you run github.com/tidwall/gjson (Go) 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

- github.com/tidwall/gjson (Go): upgrade to 1.9.3 or later

  ```sh
  go get github.com/tidwall/gjson@v1.9.3
  ```


## Affected products

- github.com/tidwall/gjson (Go) SEMVER:introduced=0,fixed=1.9.3

## Identifiers

- CVE-2021-42836
- CVE-2021-42248
- GHSA-c9gm-7rfj-8w5h
- GHSA-ppj4-34rq-v8j9
- GO-2021-0265

## Related threats

- [GO-2022-0957 - Denial of service via maliciously crafted JSON in github.com/tidwall/gjson](https://junglewise.ai/threats/cve-2020-36066-github-com-tidwall-gjson-is-vulnerable-to-denial-of-service)
- [GO-2022-0592 - A maliciously crafted path can cause Get and other query functions
to consume excessive amounts of CPU and time.](https://junglewise.ai/threats/go-2022-0592-a-maliciously-crafted-path-can-cause-get-and-other-query-8d2fb414)
- [GO-2021-0059 - Panic due to improper input validation in Get in github.com/tidwall/gjson](https://junglewise.ai/threats/cve-2020-35380-denial-of-service-in-gjson)
- [GO-2021-0054 - Panic due to improper input validation in ForEach in github.com/tidwall/gjson](https://junglewise.ai/threats/cve-2020-36067-improper-validation-of-array-index-in-gjson)
