{"answers":{"affected":"3 open source packages ship an affected version, including github.com/gorilla/csrf.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24358 exists.","fix":"Upgrade github.com/gorilla/csrf to 1.7.3 or later.","what":"CVE-2025-24358 is a medium-severity vulnerability in gorilla csrf, published on 15 Apr 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-24358 and fix it if it is affected.\n\nWhat it is: CVE-2025-24358 is a medium-severity vulnerability in gorilla csrf, published on 15 Apr 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24358 exists.\n\nAffected packages and fixed versions:\n- github.com/gorilla/csrf (Go): affected all versions; fixed in 1.7.3\n- github.com/gorilla/csrf (Go): affected all versions; fixed in 1.7.3\n- github.com/gorilla/csrf (Go): affected all versions; fixed in 1.7.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-24358/ (Markdown: https://insights.sbomify.com/CVE-2025-24358/index.md)","id":"CVE-2025-24358","markdown":"https://insights.sbomify.com/CVE-2025-24358/index.md","name":"CVE-2025-24358","record":{"aliases":["CLEANSTART-2025-TT45966","DEBIAN-CVE-2025-24358","DLA-4151-1","GHSA-rq77-p4h8-4crw","GO-2025-3607","MINI-447g-8ffj-q7jp","MINI-8f68-757x-cwhr","MINI-fw5r-v3mw-g3cg","MINI-h932-7x25-m27r","MINI-jj73-c2w5-vhcp","MINI-jr5f-jr7q-rhqw","MINI-m24v-ghjg-wp3h","MINI-mrvj-r5fm-62x5","UBUNTU-CVE-2025-24358"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Go CSRF middleware","requires_auth":"none","summary":"An attacker with XSS on a related domain can bypass CSRF protections to perform authenticated actions on Go web applications using this library.","user_interaction":"required","vuln_class":"csrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","version":"4.0"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"description":"gorilla/csrf provides Cross Site Request Forgery (CSRF) prevention middleware for Go web applications \u0026 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 cross-origin requests only when it believes the request is being served over TLS. It determines this by inspecting the r.URL.Scheme value. However, this value is never populated for \"server\" requests per the Go spec, and so this check does not run in practice. 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 vulnerability is fixed in 1.7.2.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"gorilla/csrf CSRF vulnerability due to broken Referer validation","id":"CVE-2025-24358","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"csrf","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"ASTEVAL Vulnerable to Maliciously Crafted Format Strings Leading to Sandbox Escape","id":"CVE-2025-24359"},"packages":[{"ecosystem":"Go","fixed":["1.7.3"],"introduced":["0"],"last_affected":[],"package":"github.com/gorilla/csrf","purl":null,"source":"GHSA-rq77-p4h8-4crw"},{"ecosystem":"Go","fixed":["1.7.3"],"introduced":["0"],"last_affected":[],"package":"github.com/gorilla/csrf","purl":"pkg:golang/github.com/gorilla/csrf","source":"GHSA-rq77-p4h8-4crw"},{"ecosystem":"Go","fixed":["1.7.3"],"introduced":["0"],"last_affected":[],"package":"github.com/gorilla/csrf","purl":"pkg:golang/github.com/gorilla/csrf","source":"GO-2025-3607"}],"prev":{"headline":"vLLM allows a malicious model RCE by torch.load in hf_model_weights_iterator","id":"CVE-2025-24357"},"products":["csrf"],"published":"2025-04-15","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-05-01","vendors":["gorilla"]},"summary":"An attacker with XSS on a related domain can bypass CSRF protections to perform authenticated actions on Go web applications using this library.","url":"https://insights.sbomify.com/CVE-2025-24358/"}