CVE-2025-29914
JSON

5.4medium

OWASP Coraza WAF has parser confusion which leads to wrong URI in `REQUEST_FILENAME`

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.32% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-q9f5-625g-xm39GO-2025-3537

Description

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.

Affected

Product or packageVersionsReported by
corazawaf coraza< 3.3.3CVE List
github.com/jptosso/coraza-waf (Go)before 3.3.3, all versionsGitHub Advisory Database, Go Vulnerability Database
github.com/corazawaf/coraza/v3 (Go)before 3.3.3GitHub Advisory Database, Go Vulnerability Database
github.com/corazawaf/coraza (Go)all versionsGo Vulnerability Database
github.com/corazawaf/coraza/v2 (Go)all versionsGo Vulnerability Database

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N

Classification

CWE-706

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Summary

URLs starting with // are not parsed properly, and the request REQUEST_FILENAME variable contains a wrong value, leading to potential rules bypass.

Details

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.

The root cause is the usage of url.Parse to parse the URI in ProcessURI.

url.Parse can parse both absolute URLs (starting with a scheme) or relative ones (just the path). //bar/uploads/foo.php is a valid absolute URI (the scheme is empty), url.Parse will consider bar as the host and the path will be set to /uploads/foo.php.

PoC
package main

import (
	"fmt"
	"net/url"
	"os"

	"github.com/corazawaf/coraza/v3"
)

const testRule = `
SecDebugLogLevel 9
SecDebugLog /dev/stdout
SecRule REQUEST_FILENAME "@rx /bar/uploads/.*\.(h?ph(p|tm?l?|ar)|module|shtml)" "id:1,phase:1,deny"
`

func main() {
	var testURL = "//bar/uploads/foo.php"

	if os.Getenv("TEST_URL") != "" {
		testURL = os.Getenv("TEST_URL")
	}

	fmt.Printf("Testing URL: %s\n", testURL)

	config := coraza.NewWAFConfig().WithDirectives(testRule)

	waf, err := coraza.NewWAF(config)

	if err != nil {
		panic(err)
	}

	tx := waf.NewTransaction()

	tx.ProcessURI(testURL, "GET", "HTTP/1.1")

	in := tx.ProcessRequestHeaders()

	if in != nil {
		fmt.Printf("%+v\n", in)
	}
}
Impact

Potential bypass of rules using REQUEST_FILENAME.

Go Vulnerability Database

OWASP Coraza WAF has parser confusion which leads to wrong URI in REQUEST_FILENAME in github.com/corazawaf/coraza

NVD (es)

OWASP Coraza WAF es una librería de firewall de aplicaciones web compatible con Golang Modsecurity. En versiones anteriores a la 3.3.3, si se realiza una solicitud en una URI que empieza por //, coraza asigna un valor incorrecto a REQUEST_FILENAME. Por ejemplo, si se asigna la URI //bar/uploads/foo.php?a=b a coraza:, REQUEST_FILENAME se asignará a /uploads/foo.php. Esto puede provocar la omisión de reglas. Esta vulnerabilidad se corrigió en la 3.3.3.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-29914 changed 2025-03-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-q9f5-625g-xm39 changed 2025-03-25CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3537 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-29914 changed 2026-06-17Public domain