Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › News › Web

Advisory Analysis

Ubuntu patches Gorilla CSRF package flaw in Go cross-site request forgery protection

Ubuntu has published notice USN-9297-1 covering the golang-github-gorilla-csrf package, a Go middleware for preventing cross-site request forgery. According to the notice, a standard system update installs the fix.

WebVulnerabilities

Key points

  • Ubuntu USN-9297-1 fixes the golang-github-gorilla-csrf package on Ubuntu 20.04, 22.04 and 24.04.
  • Inadequate Origin and Referer checks could let an attacker on a sibling site under the same top-level domain mount CSRF attacks, per the notice.
  • The fix treats requests as HTTPS unless the application marks them as plain HTTP.
  • The notice lists no CVE identifiers, severity rating or exploitation status.

According to the Ubuntu Security Notice USN-9297-1, the Gorilla CSRF package, a middleware that guards Go applications against cross-site request forgery, did not adequately check the Origin and Referer values of requests coming from other origins. The notice says a remote attacker who could run cross-site scripting on a sibling site under the same top-level domain might be able to use this to carry out CSRF attacks and act on behalf of another user. The fix changes the package so that all requests are treated as HTTPS unless the application explicitly marks them as plain HTTP.

Fixed versions are listed for three Ubuntu releases: 1.7.2-1ubuntu0.24.04.1 for Ubuntu 24.04, 1.6.2-2+deb11u1build0.22.04.1 for Ubuntu 22.04, and 1.6.2-2ubuntu0.20.04.1~esm1 for Ubuntu 20.04 under extended security maintenance. The notice says a standard system update installs the necessary changes and describes no separate workaround.

The notice lists no CVE identifiers, and it does not state a severity rating or say whether exploitation has been observed. Administrators should review the original Ubuntu notice for full details.

What to do

  1. Apply the standard Ubuntu system update, which the notice says installs the necessary changes.
  2. Check that golang-github-gorilla-csrf is at or above the fixed version listed for your Ubuntu release.
  3. Review the original Ubuntu Security Notice USN-9297-1 for full details.

Our article, written with AI assistance from the facts of the original report and the official vulnerability data below. Read the original for full details.

Original report

Ubuntu USNubuntu.com

“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 applica…