USN-9297-1: Gorilla CSRF vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/golang-github-gorilla-csrf-devto a version that resolves this vulnerability.Fixed in 1.7.2-1ubuntu0.24.04.1 - Upgrade
Upgrade
ubuntu/golang-github-gorilla-csrf-devto a version that resolves this vulnerability.Fixed in 1.6.2-2+deb11u1build0.22.04.1 - Upgrade
Upgrade
ubuntu/golang-github-gorilla-csrf-devto a version that resolves this vulnerability.Fixed in Ubuntu Pro - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch USN-9297-1
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Applications using Gorilla CSRF are exposed when an attacker can perform cross-site scripting on a site that shares the application's top-level domain. The issue could then enable cross-site request forgery attacks against the application.
What changes in the updated behavior could affect deployments?
After the update, Gorilla CSRF treats requests as HTTPS by default. Applications that serve plaintext HTTP must explicitly mark those requests as plaintext HTTP.