Back to CVE records
High 7.3Published Aug 29, 2025

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

Updated under an hour ago ()

Does this affect you?

It affects github.com/gorilla/csrf. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
7.3 HIGH (v3.1, CISA ADP)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Weakness (CWE)
CWE-346
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
Go
NVD analysis
Deferred
Record last updated
Aug 29, 2025
First seen by InfoSec Signals
Oct 19, 2026

Affected products

Affected products
github.com/gorilla/csrf github.com/gorilla/csrf
github.com_gorilla_csrf:github.com_gorilla_csrf (from the name)
before 1.7.3 not affected
CNA record

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.