VYPR
Medium severity5.4NVD Advisory· Published Mar 20, 2025· Updated Apr 15, 2026

CVE-2025-29914

CVE-2025-29914

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 packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/jptosso/coraza-wafGo
< 3.3.33.3.3
github.com/corazawaf/coraza/v3Go
< 3.3.33.3.3

Patches

1
4722c9ad0d50

Merge commit from fork

https://github.com/corazawaf/corazablotusMar 20, 2025via ghsa
2 files changed · +77 1
  • internal/corazawaf/transaction.go+1 1 modified
    @@ -765,7 +765,7 @@ func (tx *Transaction) ProcessURI(uri string, method string, httpVersion string)
     		uri = uri[:in]
     	}
     	path := ""
    -	parsedURL, err := url.Parse(uri)
    +	parsedURL, err := url.ParseRequestURI(uri)
     	query := ""
     	if err != nil {
     		tx.variables.urlencodedError.Set(err.Error())
    
  • internal/corazawaf/transaction_test.go+76 0 modified
    @@ -7,6 +7,7 @@ import (
     	"bytes"
     	"fmt"
     	"io"
    +	"net/http"
     	"regexp"
     	"runtime/debug"
     	"strconv"
    @@ -1787,3 +1788,78 @@ func TestCloseFails(t *testing.T) {
     		t.Fatalf("unexpected error message: %s", err.Error())
     	}
     }
    +
    +func TestRequestFilename(t *testing.T) {
    +	tests := []struct {
    +		name     string
    +		uri      string
    +		expected string
    +	}{
    +		{
    +			name:     "simple",
    +			uri:      "/foo",
    +			expected: "/foo",
    +		},
    +		{
    +			name:     "with query",
    +			uri:      "/foo?bar=baz",
    +			expected: "/foo",
    +		},
    +		{
    +			name:     "with query and fragment",
    +			uri:      "/foo?bar=baz#qux",
    +			expected: "/foo",
    +		},
    +		{
    +			name:     "subdirectory",
    +			uri:      "/foo/bar",
    +			expected: "/foo/bar",
    +		},
    +		{
    +			name:     "subdirectory with query",
    +			uri:      "/foo/bar?baz=qux",
    +			expected: "/foo/bar",
    +		},
    +		{
    +			name:     "multiple leading slashes",
    +			uri:      "//foo/bar",
    +			expected: "//foo/bar",
    +		},
    +		{
    +			name:     "multiple leading slashes - 2",
    +			uri:      "///foo/bar",
    +			expected: "///foo/bar",
    +		},
    +		{ // This is a bug. This test should be adapted when the issue is fixed.
    +			name:     "invalid encoding",
    +			uri:      "/foo%zz?a=b",
    +			expected: "/foo%zz?a=b",
    +		},
    +		{
    +			name:     "valid encoding",
    +			uri:      "/foo%20bar",
    +			expected: "/foo bar",
    +		},
    +		{
    +			name:     "trailing slash",
    +			uri:      "/foo/bar/",
    +			expected: "/foo/bar/",
    +		},
    +		{
    +			name:     "duplicated slashes",
    +			uri:      "//foo//bar",
    +			expected: "//foo//bar",
    +		},
    +	}
    +
    +	for _, test := range tests {
    +		t.Run(test.name, func(t *testing.T) {
    +			waf := NewWAF()
    +			tx := waf.NewTransaction()
    +			tx.ProcessURI(test.uri, http.MethodGet, "HTTP/1.1")
    +			if tx.variables.requestFilename.Get() != test.expected {
    +				t.Fatalf("Expected REQUEST_FILENAME %q, got %q", test.expected, tx.variables.requestFilename.Get())
    +			}
    +		})
    +	}
    +}
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.