OWASP Coraza WAF: Cookie Parser Confusion
corazawaf coraza
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/corazawaf/coraza/v3 Go |
|
|
| github.com/corazawaf/coraza Go |
| No fix yet |
| github.com/corazawaf/coraza/v2 Go |
|
corazawaf coraza
| Product | Affected | Fixed in |
|---|---|---|
| github.com/corazawaf/coraza/v3 Go |
|
|
| github.com/corazawaf/coraza Go |
| No fix yet |
| github.com/corazawaf/coraza/v2 Go |
|
| No fix yet |
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.
From the CVE record · GitHub_M
Coraza's cookie parser can handle certain control characters and empty or control-only cookie names differently from a backend application's parser. An unauthenticated attacker can send a crafted Cookie header that causes rules targeting REQUEST_COOKIES or REQUEST_COOKIES_NAMES to miss data the application sees. Exploitation depends on the backend parser and the affected rules.
Check deployments using Go github.com/corazawaf/coraza/v3 before 3.8.1, or any version of github.com/corazawaf/coraza or github.com/corazawaf/coraza/v2.