Skip to main content

V3: Coraza JSON body processor: argument-limit truncation reopens an unbounded-depth gjson.Valid stack overflow (process crash)

0
High
Published: 10/08/2026 (10/08/2026, 17:45:46 UTC)
Source: GCVE Database
Product: github.com/corazawaf/coraza/v3

Description

A stack overflow vulnerability exists in the Coraza JSON body processor (github.com/corazawaf/coraza/v3) that can cause the entire host process to crash. This occurs due to an unbounded recursion in the gjson.Valid function when processing deeply nested JSON bodies that bypass argument and byte limits. An unauthenticated attacker can trigger this with a crafted JSON request body well within default and recommended size limits, causing a fatal stack overflow that terminates the process unconditionally.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

Goghsa
github.com/corazawaf/coraza/v3
Affected versions
>=3.0.0 <3.8.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/08/2026, 22:12:26 UTC

Technical Analysis

The Coraza JSON body processor uses a bounded recursion function readItems to parse JSON bodies with limits on recursion depth, argument count, and byte budget. However, if the argument limit is reached early, readItems stops processing and returns no error, causing readJSON to call gjson.Valid on the entire raw JSON body. The gjson.Valid function recurses without a depth bound, leading to an unbounded stack overflow and process crash for deeply nested JSON inputs. This vulnerability affects Coraza versions >=3.0.0 and <3.8.1. The crash is a fatal stack overflow error that cannot be recovered by Go's panic/recover mechanism, resulting in process termination.

Potential Impact

An unauthenticated attacker can send a specially crafted JSON HTTP request to any endpoint protected by Coraza with the JSON body processor enabled (default for application/json). This triggers a fatal stack overflow crash of the host process, causing denial of service. The crash cannot be caught or mitigated by the integrator, requiring process restart and causing loss of all in-flight requests. The attack payload is smaller than default and recommended body and argument limits, making it practical to exploit.

Mitigation Recommendations

A patch is available for this vulnerability. Users should upgrade Coraza to version 3.8.1 or later where this issue is fixed. The fix involves adding an explicitly bounded-depth pre-scan or reusing readItems' recursion accounting before calling gjson.Valid to prevent unbounded recursion. Until patched, no effective mitigation exists as the crash is unrecoverable and triggered by default configuration limits.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-6gcq-wc29-5xf2
Osv Schema Version
1.4.0
Ecosystems
["Go"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6ac80fb92cdf04f65639c2b3

Added to database: 10/08/2026, 21:48:41 UTC

Last enriched: 10/08/2026, 22:12:26 UTC

Last updated: 10/08/2026, 22:12:26 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses