CVE-2026-107835
OWASP Coraza WAF: Cookie Parser Confusion
OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. Prior to 3.8.1, internal/cookies.ParseCookies in internal/cookies/cookies.go handles boundary ASCII control characters and control-only or empty cookie names differently from several backend cookie parsers. An unauthenticated attacker can craft a Cookie header so Coraza indexes or drops a cookie under a different name or value from the backend application, causing rules targeting REQUEST_COOKIES or REQUEST_COOKIES_NAMES to miss application-visible attacker data. Exploitation depends on the backend parser and affected rule scope, and interior control characters with inconsistent backend behavior are outside this advisory's remediation. This issue is fixed in version 3.8.1.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
4.0
OWASP Coraza WAF: Cookie Parser Confusion
OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. Prior to 3.8.1, internal/cookies.ParseCookies in internal/cookies/cookies.go handles boundary ASCII control characters and control-only or empty cookie names differently from several backend cookie parsers. An unauthenticated attacker can craft a Cookie header so Coraza indexes or drops a cookie under a different name or value from the backend application, causing rules targeting REQUEST_COOKIES or REQUEST_COOKIES_NAMES to miss application-visible attacker data. Exploitation depends on the backend parser and affected rule scope, and interior control characters with inconsistent backend behavior are outside this advisory's remediation. This issue is fixed in version 3.8.1.
- Record
CVE-2026-107835- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-436
- Updated
- 2026-11-02
EUVDEUVD-2026-95930
4.0
OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. Prior to 3.8.1, internal/cookies.ParseCookies in internal/cookies/cookies.go handles boundary ASCII control characters and control-only or empty cookie names differently from several backend cookie parsers. An unauthenticated attacker can craft a Cookie header so Coraza indexes or drops a cookie under a different name or value from the backend application, causing rules targeting REQUEST_COOKIES or REQUEST_COOKIES_NAMES to miss application-visible attacker data. Exploitation depends on the backend parser and affected rule scope, and interior control characters with inconsistent backend behavior are outside this advisory's remediation. This issue is fixed in version 3.8.1.
- Record
EUVD-2026-95930- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-g4qm-m288-5cp9
4.0
Coraza has Cookie Parser Confusion
Summary
Coraza's cookie parser (internal/cookies.ParseCookies) does not strip ASCII control characters (CTLs) from the edges of a cookie name/value before they're matched against REQUEST_COOKIES / REQUEST_COOKIES_NAMES. When a CTL sits directly next to the = separator, Coraza absorbs it into the adjacent name or value, while several backend cookie parsers trim it away — so the WAF and the application disagree about the cookie it just received.
Root cause
ParseCookies(internal/cookies/cookies.go:17,26,31) trims vianet/textproto.TrimString, which strips only space (0x20) and tab (0x09).- RFC 6265 §4.1.1 defines cookie
nameas an HTTPtokenandvalueascookie-octet, both excluding the full C0 control range (0x00–0x1F,0x7F) — not just space/tab. - Input
a\v=\t'(vertical tab\vnext to=) keeps\vin the name (a\v), yielding name=a\v, value=\t'.
Confirmed divergence from real backends
| Implementation | Name | Value |
|---|---|---|
| Coraza (< 3.8.0) | a\v | \t' |
| Python http.cookies, and the Werkzeug/Flask version in the report below | a | ' |
| PHP $_COOKIE | a | \t' |
| Node.js cookie package | a\v | ' |
RFC 6265 itself calls this exact cookie-pair invalid, so there's no single spec-correct reference — but Coraza's boundary handling diverges from 2 of these 3 widely-used backends.
Correction (2026-10-02): current Werkzeug (3.1.9, checked during review of the 3.8.1 follow-up) keeps a\v as the name, like Node's cookie package. The name divergence therefore applies to PHP and to Python's http.cookies, not to every Werkzeug version.
Impact
An attacker can pad a Cookie header with a CTL adjacent to = so Coraza indexes a different name/value than the backend application does. A SecRule scoped to a specific cookie name or value can then miss the cookie the application actually processes — a WAF bypass for cookie-carried attacks.
Affected component
internal/cookies.ParseCookies, consumed via REQUEST_COOKIES / REQUEST_COOKIES_NAMES.
Fix
Trim the full CTL range (not just space/tab) from both ends of the extracted name and value, treating a boundary-adjacent CTL as a delimiter rather than token content — aligning with RFC 6265's token/cookie-octet grammar.
The fix does not attempt to resolve what happens when a CTL lands in the interior of an otherwise-plausible name (e.g. ab\vcd). That case is disputed among the backends themselves — Python's http.cookies rejects the whole pair, PHP strips the CTL from the middle, Node's cookie package keeps it — so there is no consensus to converge on. It is left as a separate follow-up rather than guessed at here.
Implementation note
The trim is deliberately hand-rolled (a byte-wise scan on b <= ' ' || b == 0x7f, which covers octets 0x00–0x20 plus 0x7F) rather than delegated to the standard library. This is a conscious choice on a security hot path and should not be "simplified" away later:
strings.TrimFuncwas measured and rejected. It invokes its predicate through a func value once per byte scanned, which Go cannot devirtualize throughstrings.indexFunc. On an Apple M2, parsing a 64 KiB CTL-saturatedCookieheader costs 167.6 µs viaTrimFuncversus 33.9 µs byte-wise — a ~5× CPU amplification handed to an attacker, on input that is attacker-controlled and parsed on every request. Allocation counts are identical either way; the cost is purely the per-byte indirect call.strings.TrimSpaceis not a substitute. It misses most of the CTL range (0x00–0x08,0x0E–0x1F,0x7F) and additionally trimsU+0085andU+00A0, whose multi-byte UTF-8 encodings a backend would not strip — reintroducing the very parser-disagreement class this advisory closes.
The byte-wise implementation was verified equivalent to a TrimFunc-based one across all 16,843,009 byte strings of length 0–3, including invalid UTF-8,…
- Record
GHSA-g4qm-m288-5cp9- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-436
- Updated
- 2026-11-02
NVD
4.0
OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. Prior to 3.8.1, internal/cookies.ParseCookies in internal/cookies/cookies.go handles boundary ASCII control characters and control-only or empty cookie names differently from several backend cookie parsers. An unauthenticated attacker can craft a Cookie header so Coraza indexes or drops a cookie under a different name or value from the backend application, causing rules targeting REQUEST_COOKIES or REQUEST_COOKIES_NAMES to miss application-visible attacker data. Exploitation depends on the backend parser and affected rule scope, and interior control characters with inconsistent backend behavior are outside this advisory's remediation. This issue is fixed in version 3.8.1.
- Record
CVE-2026-107835- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-436
- Updated
- 2026-11-02
OSV
4.0
OWASP Coraza WAF: Cookie Parser Confusion
OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. Prior to 3.8.1, internal/cookies.ParseCookies in internal/cookies/cookies.go handles boundary ASCII control characters and control-only or empty cookie names differently from several backend cookie parsers. An unauthenticated attacker can craft a Cookie header so Coraza indexes or drops a cookie under a different name or value from the backend application, causing rules targeting REQUEST_COOKIES or REQUEST_COOKIES_NAMES to miss application-visible attacker data. Exploitation depends on the backend parser and affected rule scope, and interior control characters with inconsistent backend behavior are outside this advisory's remediation. This issue is fixed in version 3.8.1.
- Record
CVE-2026-107835- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-436
- Updated
- 2026-11-02
OSVGHSA-g4qm-m288-5cp9
4.0
Coraza has Cookie Parser Confusion
Summary
Coraza's cookie parser (internal/cookies.ParseCookies) does not strip ASCII control characters (CTLs) from the edges of a cookie name/value before they're matched against REQUEST_COOKIES / REQUEST_COOKIES_NAMES. When a CTL sits directly next to the = separator, Coraza absorbs it into the adjacent name or value, while several backend cookie parsers trim it away — so the WAF and the application disagree about the cookie it just received.
Root cause
ParseCookies(internal/cookies/cookies.go:17,26,31) trims vianet/textproto.TrimString, which strips only space (0x20) and tab (0x09).- RFC 6265 §4.1.1 defines cookie
nameas an HTTPtokenandvalueascookie-octet, both excluding the full C0 control range (0x00–0x1F,0x7F) — not just space/tab. - Input
a\v=\t'(vertical tab\vnext to=) keeps\vin the name (a\v), yielding name=a\v, value=\t'.
Confirmed divergence from real backends
| Implementation | Name | Value |
|---|---|---|
| Coraza (< 3.8.0) | a\v | \t' |
| Python http.cookies, and the Werkzeug/Flask version in the report below | a | ' |
| PHP $_COOKIE | a | \t' |
| Node.js cookie package | a\v | ' |
RFC 6265 itself calls this exact cookie-pair invalid, so there's no single spec-correct reference — but Coraza's boundary handling diverges from 2 of these 3 widely-used backends.
Correction (2026-10-02): current Werkzeug (3.1.9, checked during review of the 3.8.1 follow-up) keeps a\v as the name, like Node's cookie package. The name divergence therefore applies to PHP and to Python's http.cookies, not to every Werkzeug version.
Impact
An attacker can pad a Cookie header with a CTL adjacent to = so Coraza indexes a different name/value than the backend application does. A SecRule scoped to a specific cookie name or value can then miss the cookie the application actually processes — a WAF bypass for cookie-carried attacks.
Affected component
internal/cookies.ParseCookies, consumed via REQUEST_COOKIES / REQUEST_COOKIES_NAMES.
Fix
Trim the full CTL range (not just space/tab) from both ends of the extracted name and value, treating a boundary-adjacent CTL as a delimiter rather than token content — aligning with RFC 6265's token/cookie-octet grammar.
The fix does not attempt to resolve what happens when a CTL lands in the interior of an otherwise-plausible name (e.g. ab\vcd). That case is disputed among the backends themselves — Python's http.cookies rejects the whole pair, PHP strips the CTL from the middle, Node's cookie package keeps it — so there is no consensus to converge on. It is left as a separate follow-up rather than guessed at here.
Implementation note
The trim is deliberately hand-rolled (a byte-wise scan on b <= ' ' || b == 0x7f, which covers octets 0x00–0x20 plus 0x7F) rather than delegated to the standard library. This is a conscious choice on a security hot path and should not be "simplified" away later:
strings.TrimFuncwas measured and rejected. It invokes its predicate through a func value once per byte scanned, which Go cannot devirtualize throughstrings.indexFunc. On an Apple M2, parsing a 64 KiB CTL-saturatedCookieheader costs 167.6 µs viaTrimFuncversus 33.9 µs byte-wise — a ~5× CPU amplification handed to an attacker, on input that is attacker-controlled and parsed on every request. Allocation counts are identical either way; the cost is purely the per-byte indirect call.strings.TrimSpaceis not a substitute. It misses most of the CTL range (0x00–0x08,0x0E–0x1F,0x7F) and additionally trimsU+0085andU+00A0, whose multi-byte UTF-8 encodings a backend would not strip — reintroducing the very parser-disagreement class this advisory closes.
The byte-wise implementation was verified equivalent to a TrimFunc-based one across all 16,843,009 byte strings of length 0–3, including invalid UTF-8,…
- Record
GHSA-g4qm-m288-5cp9- CVSS 3.1
- 4.0 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N - Weakness
- CWE-436
- Updated
- 2026-11-02
OSVGO-2026-6694 No score
Coraza has Cookie Parser Confusion in github.com/corazawaf/coraza
Coraza has Cookie Parser Confusion in github.com/corazawaf/coraza
- Record
GO-2026-6694- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/corazawaf/coraza/v3Go |
before 3.8.1 | 3.8.1 |
github.com/corazawaf/corazaGo |
All versions | None known |
github.com/corazawaf/coraza/v2Go |
All versions | None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-107835 is a medium vulnerability (CVSS 4.0) in Corazawaf Coraza, published October 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 22nd percentile. Fixed in github.com/corazawaf/coraza/v3 3.8.1.
References
github.com/corazawaf/coraza/security/advisories/GHSA-g4qm-m288-5cp9
github.com/corazawaf/coraza/commit/0b940e197ad9983fb3aa36e84f1f81ff985461af
github.com/corazawaf/coraza/commit/9f8521398d1ff023b958fad0b944cac265763866
github.com/corazawaf/coraza/releases/tag/v3.8.1
github.com/advisories/GHSA-g4qm-m288-5cp9
github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107835.json
nvd.nist.gov/vuln/detail/CVE-2026-107835
github.com/corazawaf/coraza
Left out here: the rest of 2 source descriptions. The JSON record has them.