CVE-2021-42836
github.com/tidwall/gjson Vulnerable to REDoS attack
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
CVE-2021-42836- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-400
- Updated
- 2026-11-02
CVE List No score
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
CVE-2021-42836- Updated
- 2026-11-02
EUVDEUVD-2021-2240 No score
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
EUVD-2021-2240- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-ppj4-34rq-v8j9
7.5
github.com/tidwall/gjson Vulnerable to REDoS attack
GJSON is a Go package that provides a fast and simple way to get values from a json document. GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
GHSA-ppj4-34rq-v8j9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-697, CWE-1333
- Updated
- 2026-11-02
OSV
7.5
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
CVE-2021-42836- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-42836
7.5
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
DEBIAN-CVE-2021-42836- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-c9gm-7rfj-8w5h
7.5
Duplicate Advisory: ReDoS via crafted JSON input in GJSON
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-ppj4-34rq-v8j9. This link is maintained to preserve external references.
Original Description
GJSON <= 1.9.2 allows attackers to cause a redos via crafted JSON input.
- Record
GHSA-c9gm-7rfj-8w5h- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVGHSA-ppj4-34rq-v8j9
7.5
github.com/tidwall/gjson Vulnerable to REDoS attack
GJSON is a Go package that provides a fast and simple way to get values from a json document. GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
GHSA-ppj4-34rq-v8j9- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333, CWE-400, CWE-697
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-42836
7.5
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
- Record
UBUNTU-CVE-2021-42836- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGO-2021-0265 No score
Denial of service via maliciously crafted path in github.com/tidwall/gjson
A maliciously crafted path can cause Get and other query functions to consume excessive amounts of CPU and time.
- Record
GO-2021-0265- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/tidwall/gjsonGo |
before 1.9.3 | 1.9.3 |
golang-github-tidwall-gjsonDebian:12 |
before 1.14.4-2 | 1.14.4-2 |
golang-github-tidwall-gjsonDebian:13 |
before 1.14.4-2 | 1.14.4-2 |
golang-github-tidwall-gjsonDebian:14 |
before 1.14.4-2 | 1.14.4-2 |
github.com/tidwall/gjsonGo From an advisory covering 2 CVEs |
before 1.9.3 | 1.9.3 |
golang-github-tidwall-gjsonUbuntu:20.04:LTS |
All versions, plus listed versions 1.1.5-2 |
None known |
golang-github-tidwall-gjsonUbuntu:22.04:LTS |
All versions, plus listed versions 1.6.7-1 |
None known |
golang-github-tidwall-gjsonUbuntu:24.04:LTS |
All versions, plus listed versions 1.14.4-21.17.1-1 |
None known |
golang-github-tidwall-gjsonUbuntu:25.10 |
All versions, plus listed versions 1.17.1-1 |
None known |
golang-github-tidwall-gjsonUbuntu:26.10 |
All versions, plus listed versions 1.17.1-11.19.0-1 |
None known |
golang-github-tidwall-gjsonUbuntu:26.04:LTS |
All versions, plus listed versions 1.17.1-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-42836 is a high vulnerability (CVSS 7.5) in Gjson Project Gjson, published October 22, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.42%, the 84th percentile. Fixed in github.com/tidwall/gjson 1.9.3.
References
github.com/tidwall/gjson/issues/236
github.com/tidwall/gjson/issues/237
github.com/tidwall/gjson/commit/77a57fda87dca6d0d7d4627d512a630f89a91c96
github.com/tidwall/gjson/compare/v1.9.2...v1.9.3
github.com/tidwall/gjson/commit/590010fdac311cc8990ef5c97448d4fec8f29944
nvd.nist.gov/vuln/detail/CVE-2021-42836