Update module github.com/gorilla/csrf to v1.7.3 [SECURITY] #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.7.1→v1.7.3GitHub Vulnerability Alerts
CVE-2025-24358
Summary
gorilla/csrf is vulnerable to CSRF via form submission from origins that share a top level domain with the target origin.
Details
gorilla/csrf does not validate the Origin header against an allowlist. Its executes its validation of the Referer header for cross-origin requests only when it believes the request is being served over TLS. It determines this by inspecting the
r.URL.Schemevalue. However, this value is never populated for "server" requests per the Go spec, and so this check does not run in practice.PoC
target.example.testprotected with gorilla/csrf and served over TLS hosting form on/submitattack.example.testserved over TLStarget.example.testdomain=.example.test and path=/submit/(the default for CSRF cookies) it will be sent first by the browser on submit to our target originattack.example.testwith exfiltrated CSRF form tokenattack.example.testOrigin / Referer headers are not validated.Impact
This vulnerability allows an attacker who has gained XSS on a subdomain or top level domain to perform authenticated form submissions against gorilla/csrf protected targets that share the same top level domain.
This bug has existed in gorilla/csrf since its initial release in 2015.
Release Notes
gorilla/csrf (github.com/gorilla/csrf)
v1.7.3Compare Source
This Release fixes the following:
Full Changelog: gorilla/csrf@v1.7.2...v1.7.3
v1.7.2Compare Source
What's Changed
New Contributors
Full Changelog: gorilla/csrf@v1.7.1...v1.7.2
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.