CVE-2025-24358

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-24358
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-24358.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-24358
Aliases
Related
Published
2025-04-15T19:16:07Z
Modified
2025-04-22T18:27:05.989890Z
Summary
[none]
Details

gorilla/csrf provides Cross Site Request Forgery (CSRF) prevention middleware for Go web applications & services. Prior to 1.7.2, gorilla/csrf does not validate the Origin header against an allowlist. Its executes its validation of the Referer header for cross-origin requests only when it believes the request is being served over TLS. It determines this by inspecting the r.URL.Scheme value. However, this value is never populated for "server" requests per the Go spec, and so this check does not run in practice. This vulnerability allows an attacker who has gained XSS on a subdomain or top level domain to perform authenticated form submissions against gorilla/csrf protected targets that share the same top level domain. This vulnerability is fixed in 1.7.2.

References

Affected packages

Debian:11 / golang-github-gorilla-csrf

Package

Name
golang-github-gorilla-csrf
Purl
pkg:deb/debian/golang-github-gorilla-csrf?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*

1.6.2-2
1.6.2-4
1.7.1-1
1.7.2-1~bpo12+1
1.7.2-1
1.7.2+ds1-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / golang-github-gorilla-csrf

Package

Name
golang-github-gorilla-csrf
Purl
pkg:deb/debian/golang-github-gorilla-csrf?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*

1.7.1-1
1.7.2-1~bpo12+1
1.7.2-1
1.7.2+ds1-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / golang-github-gorilla-csrf

Package

Name
golang-github-gorilla-csrf
Purl
pkg:deb/debian/golang-github-gorilla-csrf?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*

1.7.1-1
1.7.2-1~bpo12+1
1.7.2-1
1.7.2+ds1-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/gorilla/csrf

Affected ranges

Type
GIT
Repo
https://github.com/gorilla/csrf
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v1.*

v1.0
v1.0.1
v1.0.2
v1.1
v1.2
v1.3
v1.4
v1.5
v1.5.1
v1.6.0
v1.6.1
v1.6.2
v1.7.0
v1.7.1
v1.7.2