Security mailing lists by PureSourceCode

CVE-2025-47909

HIGH 7.3CVSS 3.1

github.com/gorilla/csrf improperly validates TrustedOrigins allowing CSRF attacks

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.

Published
29 Aug 2025
Last modified
19 Oct 2026
Assigned by
security@golang.org
NVD status
Deferred
Weakness
CWE-346CWE-352CWE-807
Also known as
GHSA-82ff-hg59-8x73GO-2025-3884
Sources
NVDJSONOSV GHSA-82ff-hg59-8x73JSONOSV GO-2025-3884JSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U
NVD 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) CVSS 3.1 HIGH 7.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV Go github.com/gorilla/csrf <= 1.7.3
OSV Go github.com/gorilla/csrf >= 1.7.3

References

History

  • 25 Nov 2026 20:58 UTC · NVD: first stored (published 29 Aug 2025)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 29 Aug 2025)
  • 25 Nov 2026 20:13 UTC · OSV: first stored (published 29 Aug 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.