Summary
It was discovered that Gorilla CSRF did not properly validate the Origin
and Referer headers of cross-origin requests. A remote attacker who was
able to perform cross-site scripting attacks on a site sharing the same
top-level domain could possibly use this issue to perform cross-site
request forgery attacks. After this update, Gorilla CSRF treats all
requests as HTTPS requests unless the application marks them as plaintext
HTTP requests.
Fixed packages 3
| Release | Package | Fixed in |
|---|---|---|
| Ubuntu · 22.04 LTS 22.04:LTS | golang-github-gorilla-csrf | 1.6.2-2+deb11u1build0.22.04.1 |
| Ubuntu · 24.04 LTS 24.04:LTS | golang-github-gorilla-csrf | 1.7.2-1ubuntu0.24.04.1 |
| Ubuntu · Pro 20.04 LTS Pro:20.04:LTS | golang-github-gorilla-csrf | 1.6.2-2ubuntu0.20.04.1~esm1 |
Vulnerabilities 1
-
Medium 5.4
gorilla/csrf CSRF vulnerability due to broken Referer validation
gorilla/csrf provides Cross Site Request Forgery (CSRF) prevention middleware for Go web applications & services. Prior to 1.7.2, gorilla/csrf does not validate the Origin header against an allowlist. Its executes its validation of the Referer header for cros…
References
-
report
https://ubuntu.com/security/CVE-2025-24358