All CVEs / github.com/gorilla/csrf
CVE-2025-47909github.com/gorilla/csrf
High 7.3 No auth needed
Follow: this CVE · github.com/gorilla/csrf · github.com/gorilla/csrf We alert you by email or Slack (account required).
- Priority
- 59
- CVSS 3.1
- 7.3
- EPSS
- —
- Auth required
- No
- Published
- Aug 29, 2025
- Updated
- Oct 19, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-346
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
What happens
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.
What to do
- Apply the vendor's security update for github.com/gorilla/csrf.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/gorilla/csrf |
≤ 1.7.3 |
no fixed version | — |
| Go | github.com/gorilla/csrf |
≥ 1.7.3 |
no fixed version | — |
Per OSV / GitHub Advisories (GHSA-82ff-hg59-8x73, GO-2025-3884). Check the version in your lockfile before upgrading.
Affected products
- github.com/gorilla/csrf · github.com/gorilla/csrf
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.