CVE-2025-47909 Details
Description
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.
A vulnerability in the Gorilla CSRF package allows for Cross-Site Request Forgery (CSRF) attacks via the TrustedOrigins feature. When a host is added to TrustedOrigins, requests from both its HTTP and HTTPS origins are implicitly allowed. This can be exploited by a network attacker who serves a form from an HTTP origin that is trusted, which will then be accepted by the application regardless of the secure HTTPS origin. This vulnerability affects all versions of the Gorilla CSRF package.
Applications should migrate to the net/http.CrossOriginProtection feature, introduced in Go 1.25. If migration is not possible, a backport is available as a module at filippo.io/csrf, and a drop-in replacement for the Gorilla CSRF API is also available at filippo.io/csrf/gorilla.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 29, 2025CISA-ADP
Assessed Aug 29, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/golang/vulndb/issues/3884 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://pkg.go.dev/vuln/GO-2025-3884 | [email protected] | AdvisoryVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-346 | Origin Validation Error | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| github.com/gorilla/csrf | All versions |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 29, 2025 | CVE Modified | CISA-ADP |
| Aug 29, 2025 | New CVE Received | [email protected] |
Volerion