OWASP Coraza WAF has parser confusion which leads to wrong URI in `REQUEST_FILENAME`
corazawaf coraza
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/jptosso/coraza-waf Go |
|
|
| github.com/corazawaf/coraza/v3 Go |
|
|
corazawaf coraza
| Product | Affected | Fixed in |
|---|---|---|
| github.com/jptosso/coraza-waf Go |
|
|
| github.com/corazawaf/coraza/v3 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.3.3, if a request is made on an URI starting with //, coraza will set a wrong value in REQUEST_FILENAME. For example, if the URI //bar/uploads/foo.php?a=b is passed to coraza: , REQUEST_FILENAME will be set to /uploads/foo.php. This can lead to a rules bypass. This vulnerability is fixed in 3.3.3.
From the CVE record · GitHub_M
Coraza sets an incorrect REQUEST_FILENAME value for requests whose URI starts with //, which can allow WAF rules to be bypassed. The issue is triggered by a crafted request; the input does not specify whether authentication or user interaction is required.
Engineers running Go packages github.com/jptosso/coraza-waf or github.com/corazawaf/coraza/v3 before 3.3.3, or any version of github.com/corazawaf/coraza or github.com/corazawaf/coraza/v2, should check their deployments.