V3: Coraza has Cookie Parser Confusion
Description
Coraza's cookie parser in versions prior to 3.8.1 does not fully strip ASCII control characters (CTLs) from cookie names and values, causing a mismatch between the WAF and backend application cookie parsing. This discrepancy can allow attackers to bypass WAF rules scoped to specific cookies by padding the Cookie header with CTLs adjacent to the '=' separator. The issue arises because Coraza trims only space and tab characters, whereas RFC 6265 requires trimming the full CTL range. A fix is available that aligns Coraza's parsing with RFC 6265 by trimming the full CTL range from cookie names and values.
CVSS v3.1
Score 4.0medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Coraza's internal cookie parser (internal/cookies.ParseCookies) trims only space and tab characters from cookie names and values, failing to remove the full ASCII control character range as defined by RFC 6265. This causes Coraza to interpret cookie names and values differently than several backend parsers, leading to a mismatch between the WAF's REQUEST_COOKIES/REQUEST_COOKIES_NAMES variables and the actual cookies processed by the application. An attacker can exploit this by inserting control characters adjacent to the '=' separator in the Cookie header, causing Coraza to index a different cookie name or value than the backend, potentially bypassing WAF rules targeting specific cookies. The fix trims the entire CTL range (0x00–0x20 plus 0x7F) from both ends of cookie names and values, aligning with RFC 6265's grammar. The fix is implemented with a byte-wise scan for performance reasons and is included in Coraza version 3.8.1 and later.
Potential Impact
The vulnerability allows an attacker to craft Cookie headers with control characters adjacent to the '=' separator, causing Coraza to parse cookie names or values differently than the backend application. This discrepancy can lead to WAF rules scoped to specific cookie names or values missing malicious cookies, enabling a WAF bypass for cookie-based attacks. The impact is limited to information bypassing WAF detection and does not directly affect confidentiality or availability.
Mitigation Recommendations
An official fix is available in Coraza version 3.8.1 that corrects the cookie parser to trim the full ASCII control character range from cookie names and values. Users should upgrade to version 3.8.1 or later to mitigate this issue. No additional action is required beyond applying the official patch.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-g4qm-m288-5cp9
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6ac80fb92cdf04f65639c2af
Added to database: 10/08/2026, 21:48:41 UTC
Last enriched: 10/08/2026, 22:11:52 UTC
Last updated: 10/08/2026, 22:11:52 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.