CVEfocus › CVE database › CVE-2025-47909

CVE-2025-47909Improper validation of TrustedOrigins allows CSRF attacks in github.com/gorilla/csrf

CVSS 7.3 HighEPSS 0.2% (higher than 8% of CVEs)Published 2025-08-29Updated 2025-08-29Assigner: Go

Hosts 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.

CWE-346

What to do

Debian, Go, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fix pending
3Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10golang-github-gorilla-csrfFix pendingUBUNTU-CVE-2025-47909
Ubuntu 26.04golang-github-gorilla-csrfUnder investigationUBUNTU-CVE-2025-47909
Ubuntu 25.10golang-github-gorilla-csrfWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2025-47909
Ubuntu 24.04golang-github-gorilla-csrfUnder investigationUBUNTU-CVE-2025-47909
Ubuntu 22.04golang-github-gorilla-csrfUnder investigationUBUNTU-CVE-2025-47909
Ubuntu 20.04golang-github-gorilla-csrfFix pendingUBUNTU-CVE-2025-47909
Debian 14golang-github-gorilla-csrfFix pendingDEBIAN-CVE-2025-47909
Debian 13golang-github-gorilla-csrfFix pendingDEBIAN-CVE-2025-47909
Debian 12golang-github-gorilla-csrfFix pendingDEBIAN-CVE-2025-47909
Go librarygithub.com/gorilla/csrfFix pendingGHSA-82ff-hg59-8x73

What the vendor says

As published in the CVE record by Go, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.