Skip to main content
Vulnerability Database/CVE-2026-107835

CVE-2026-107835: OWASP Coraza WAF Cookie Parsing Flaw

CVE-2026-107835 is an information disclosure vulnerability in OWASP Coraza WAF affecting cookie parsing mechanisms. Attackers can bypass security rules by exploiting cookie name handling. This article covers technical details, affected versions, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107835 Overview

CVE-2026-107835 is a parser inconsistency vulnerability in OWASP Coraza, a Go-based web application firewall (WAF) library compatible with ModSecurity rulesets. Versions prior to 3.8.1 contain flawed cookie parsing logic in internal/cookies.ParseCookies that handles boundary ASCII control characters and empty or control-only cookie names differently from common backend cookie parsers. An unauthenticated attacker can craft a Cookie header that Coraza indexes under a different name or drops entirely, while the backend application still processes the attacker-controlled value. This causes rules targeting REQUEST_COOKIES and REQUEST_COOKIES_NAMES to miss malicious payloads delivered through cookies.

Critical Impact

Attackers can bypass WAF rules that inspect cookie names and values, allowing malicious payloads to reach backend applications undetected.

Affected Products

  • OWASP Coraza WAF versions prior to 3.8.1
  • Applications relying on Coraza for REQUEST_COOKIES or REQUEST_COOKIES_NAMES rule enforcement
  • Backend stacks with cookie parsers that disagree with Coraza's normalization (for example, Node.js cookie package)

Discovery Timeline

  • 2026-10-09 - CVE-2026-107835 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-107835

Vulnerability Analysis

The flaw is an interpretation conflict [CWE-436] between Coraza's cookie parser and backend parsers. Coraza's ParseCookies function in internal/cookies/cookies.go strips ASCII control characters (CTLs) and spaces from both cookie names and values. When the resulting name is empty, prior versions dropped the entire cookie pair. Downstream parsers, including Node.js's cookie package, retain these pairs and expose the value to the application. The mismatch means WAF rules examining REQUEST_COOKIES_NAMES never see attacker-visible data that reaches the application.

Root Cause

The root cause lies in how Coraza normalized cookie names before indexing. The parser trimmed control characters and spaces, then discarded any pair whose name became empty. Backend parsers either preserve the raw bytes or keep the pair under an empty-string key, producing divergent views of the same Cookie header.

Attack Vector

An unauthenticated remote attacker constructs a Cookie header where the name consists only of control characters or whitespace followed by a payload value, for example Cookie: \\x01=<payload>. Coraza drops or re-indexes the pair, bypassing rules that would otherwise flag the payload, while the backend processes <payload> as a cookie value.

go
// Patch: internal/cookies/cookies.go
		name, val, _ := strings.Cut(part, "=")
		name = trimCTLAndSpace(name)
		val = trimCTLAndSpace(val)
-		// if name is empty (eg: "Cookie:   =foo;") skip it
-		if name == "" {
+		// A name that is empty, or only CTLs and spaces, is kept under ""
+		// rather than skipped: Node's cookie package still hands
+		// "=payload" and "\\x01=payload" to the application, so dropping
+		// the pair would hide its value from REQUEST_COOKIES. Only a
+		// pair with nothing left to inspect ("=") is skipped.
+		// See GHSA-g4qm-m288-5cp9.
+		if name == "" && val == "" {
			continue
		}
		cookies[name] = append(cookies[name], val)

Source: Coraza Commit 9f85213

A companion fix in internal/corazawaf/transaction.go prevents regex-based exceptions from unintentionally matching the empty-string key introduced by the parser change:

go
// Patch: internal/corazawaf/transaction.go
-			if (ex.KeyRx != nil && ex.KeyRx.MatchString(lkey)) || strings.ToLower(ex.KeyStr) == lkey || (ex.KeyStr == "" && ex.KeyRx == nil) {
+			// KeyStr is only meaningful without KeyRx: a regex exception from ctl
+			// carries an empty KeyStr, which would otherwise match a key named "".
+			if (ex.KeyRx != nil && ex.KeyRx.MatchString(lkey)) || (ex.KeyRx == nil && (ex.KeyStr == "" || strings.ToLower(ex.KeyStr) == lkey)) {
				isException = true
				break
			}

Source: Coraza Commit 9f85213

Detection Methods for CVE-2026-107835

Indicators of Compromise

  • Cookie headers containing names composed solely of ASCII control characters (0x01-0x1F) followed by = and a payload
  • Requests with leading =value cookie entries where the name is empty
  • Cookie values containing SQL, XSS, or command injection payloads that bypassed WAF inspection but appear in backend logs

Detection Strategies

  • Compare Coraza's parsed REQUEST_COOKIES_NAMES output against raw Cookie headers to spot discarded pairs
  • Deploy custom rules that reject cookie headers containing non-printable characters in name positions
  • Correlate WAF-cleared requests with backend application logs that show unexpected cookie-driven behavior

Monitoring Recommendations

  • Log the full raw Cookie header before Coraza parsing for forensic comparison
  • Alert on cookie names shorter than one printable character after parsing
  • Track the Coraza library version across deployed services to confirm all instances run 3.8.1 or later

How to Mitigate CVE-2026-107835

Immediate Actions Required

  • Upgrade OWASP Coraza to version 3.8.1 or later across all deployments
  • Audit custom ModSecurity rules that rely on REQUEST_COOKIES or REQUEST_COOKIES_NAMES for sensitive policy decisions
  • Rebuild and redeploy any Go binaries that statically link affected Coraza versions

Patch Information

The issue is fixed in Coraza Release v3.8.1. The remediation preserves cookie pairs whose names normalize to empty under the "" key, aligning Coraza's view with downstream parsers so rules can inspect attacker-controlled values. See the GitHub Security Advisory GHSA-g4qm-m288-5cp9 for full advisory details. Interior control characters with inconsistent backend behavior remain outside this advisory's remediation scope.

Workarounds

  • Add a reverse proxy or ingress rule that rejects requests containing ASCII control characters in Cookie headers
  • Introduce a custom Coraza rule to block any request with an empty or whitespace-only cookie name
  • Normalize Cookie headers upstream of Coraza so names match the backend parser's view
bash
# Example upgrade for Go projects consuming Coraza
go get github.com/corazawaf/coraza/v3@v3.8.1
go mod tidy
go build ./...

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.