CVE-2025-47909

NameCVE-2025-47909
DescriptionHosts listed in TrustedOrigins implicitly allow requests from the corresponding HTTP origins, allowing network MitMs to perform CSRF attacks. After the CVE-2025-24358 fix, a network attacker that places a form at http://example.com can't get it to submit to https://example.com because the Origin header is checked with sameOrigin against a synthetic URL. However, if a host is added to TrustedOrigins, both its HTTP and HTTPS origins will be allowed, because the schema of the synthetic URL is ignored and only the host is checked. For example, if an application is hosted on https://example.com and adds example.net to TrustedOrigins, a network attacker can serve a form at http://example.net to perform the attack. Applications should migrate to net/http.CrossOriginProtection, introduced in Go 1.25. If that is not an option, a backport is available as a module at filippo.io/csrf, and a drop-in replacement for the github.com/gorilla/csrf API is available at filippo.io/csrf/gorilla.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
golang-github-gorilla-csrf (PTS)bullseye1.6.2-2vulnerable
bullseye (security)1.6.2-2+deb11u1vulnerable
bookworm1.7.1-1vulnerable
forky, sid, trixie1.7.2+ds1-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
golang-github-gorilla-csrfsource(unstable)(unfixed)

Notes

[trixie] - golang-github-gorilla-csrf <no-dsa> (Minor issue)
[bookworm] - golang-github-gorilla-csrf <no-dsa> (Minor issue)
https://github.com/golang/vulndb/issues/3884
https://github.com/advisories/GHSA-82ff-hg59-8x73

Search for package or bug name: Reporting problems