CVE-2025-24358

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-24358
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-24358.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-24358
Aliases
Downstream
Related
Published
2025-04-15T19:16:07Z
Modified
2025-10-10T05:06:24.258768Z
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

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