CVE-2025-46721 affects nosurf, a CSRF protection middleware for Go, in versions prior to 1.2.0. Due to misuse of Go's net/http library, nosurf treats incoming requests as plain HTTP, causing it not to enforce same-origin Referer validation in cases where it should. As a result, an attacker who can control HTML content on the target site itself or on a subdomain of the target site can bypass nosurf's CSRF protections. The issue is exploitable because such an attacker may be able to read or overwrite cookies scoped to the parent domain, including the CSRF token cookie. With a known or attacker-set CSRF token, the attacker can generate forged cross-site requests that satisfy nosurf's token checks and are accepted as legitimate requests on behalf of the victim user.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository provides a proof-of-concept (PoC) exploit for CVE-2025-46721, a CSRF vulnerability in the justinas/nosurf Go library (versions before 1.2.0). The vulnerability arises from improper same-origin checks due to reliance on the .URL.Scheme field, which is not set by the Go HTTP server. The repository contains two main Go files: 'attacker.go' (simulates an attacker-controlled subdomain) and 'target.go' (the vulnerable target server using nosurf). The Caddyfile configures reverse proxying for both the attacker and target servers on different subdomains. The PoC demonstrates that an attacker with control over a subdomain can craft a POST request with a valid CSRF token to the main domain, bypassing nosurf's CSRF protection. The exploit is operational as a PoC and requires a specific local setup with Caddy and Go. No weaponized or automated exploitation is present; the code is intended for demonstration and testing of the vulnerability.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
2 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.