USN-9297-1: Gorilla CSRF vulnerability

Published Dec 1, 2026
·
Updated

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

6 affected componentsFixes available
All of the following
ubuntu/golang-github-gorilla-csrf-dev<1.7.2-1ubuntu0.24.04.1
1.7.2-1ubuntu0.24.04.1
Ubuntu Ubuntu=24.04
All of the following
ubuntu/golang-github-gorilla-csrf-dev<1.6.2-2+deb11u1build0.22.04.1
1.6.2-2+deb11u1build0.22.04.1
Ubuntu Ubuntu=22.04
All of the following
ubuntu/golang-github-gorilla-csrf-dev<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=20.04

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/golang-github-gorilla-csrf-dev to a version that resolves this vulnerability.

    Fixed in 1.7.2-1ubuntu0.24.04.1
  2. Upgrade

    Upgrade ubuntu/golang-github-gorilla-csrf-dev to a version that resolves this vulnerability.

    Fixed in 1.6.2-2+deb11u1build0.22.04.1
  3. Upgrade

    Upgrade ubuntu/golang-github-gorilla-csrf-dev to a version that resolves this vulnerability.

    Fixed in Ubuntu Pro
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch USN-9297-1

Event History

Dec 1, 2026
Advisory Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

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.

2

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203