Skip to content
Fencer Vulns
high 7.5

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

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

Weakness
  • CWE-400 Uncontrolled Resource Consumption
  • CWE-1333 Inefficient Regular Expression Complexity
  • CWE-697 Incorrect Comparison

References

Sources

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.