CVE-2021-42836 json
github.com/tidwall/gjson Vulnerable to REDoS attack
published 2021-10-22 5 y ago modified 2026-06-17 4 mo ago also CVE-2021-42248 , GHSA-c9gm-7rfj-8w5h , GHSA-ppj4-34rq-v8j9 , GO-2021-0265 , EUVD-2021-2240
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known
Summary
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
Patch / fix
- go github.com/tidwall/gjson 1.9.3
- gjson_project gjson 1.9.3
- golang-github-tidwall-gjson Debian 14, Debian 13, Debian 12 1.14.4-2
debian advisories DEBIAN-CVE-2021-42836
- github.com/tidwall/gjson@77a57fd commit
- github.com/tidwall/gjson@590010f commit
- github.com/tidwall/gjson/issues/237 advisory
Exploit prediction
2.42% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/tidwall/gjson/issues/237 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/tidwall/gjson/issues/236 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/tidwall/gjson | <1.9.3 |
1.9.3 |
Classification
References
-
github.com
/tidwall/gjson/commit/77a57fda87dca6d0d7d4627d512a630f89a91c96
web, patch, third-party-advisory
-
github.com
/tidwall/gjson/commit/590010fdac311cc8990ef5c97448d4fec8f29944
web, patch, third-party-advisory
-
github.com
/tidwall/gjson/issues/237
web, exploit, issue-tracking, patch, third-party-advisory
-
github.com
/tidwall/gjson/issues/236
web, exploit, issue-tracking, third-party-advisory
-
github.com
/tidwall/gjson/compare/v1.9.2...v1.9.3
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-42836
advisory
-
github.com
/tidwall/gjson
package
-
pkg.go.dev
/vuln/GO-2021-0265
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-42248
advisory
Sources
- CVE List CVE-2021-42836
- GitHub Advisory GHSA-ppj4-34rq-v8j9
- GitHub Advisory GHSA-c9gm-7rfj-8w5h
- NVD CVE-2021-42836
- OSV GO-2021-0265
Fencer Vulns 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.