CVE-2021-42836 Duplicate Advisory: ReDoS via crafted JSON input in GJSON
Attackers can cause a denial of service in applications using the GJSON library by triggering a regular expression denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-42836?
CVE-2021-42836 is a high-severity denial of service vulnerability in n/a, published on 22 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
Weakness: CWE-400
Which versions are affected by CVE-2021-42836?
4 open source packages ship an affected version, including github.com/tidwall/gjson. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/tidwall/gjson Go | All versions | 1.9.3 |
github.com/tidwall/gjson Go | All versions | 1.9.3 |
github.com/tidwall/gjson Go | All versions | 1.9.3 |
github.com/tidwall/gjson Go | All versions | 1.9.3 |
Products include Gjson Project Gjson.
How do I fix CVE-2021-42836?
Upgrade github.com/tidwall/gjson to 1.9.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-42836 being exploited?
There is no known exploitation of CVE-2021-42836 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as CVE-2021-42248, DEBIAN-CVE-2021-42836, GHSA-c9gm-7rfj-8w5h, GHSA-ppj4-34rq-v8j9, UBUNTU-CVE-2021-42836.