CVE-2025-64166: mercurius · Cross-Site Request Forgery (CSRF)
Affects mercuriusSource CVE Database V5
Not known to be exploited · CVSS 5.4 Medium : upgrade to 16.4.0 when convenient.
Data as of 30 Oct 2026, 06:59 UTC
- EPSS
- 0.1% chance of exploitation in 30 days – higher than 6% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 16.4.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 5 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade mercurius and mercurius-js/mercurius to 16.4.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| mercurius-jsmercurius | Affected
| Fixed in
|
npmmercurius-js/mercuriuspkg:npm/mercurius-js/mercuriusOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- Upgrade mercurius to version 16.4.0 or later immediately to apply the official patch that corrects Content-Type parsing.
- Implement strict Content-Type validation on the server side to reject or properly handle unexpected content types.
- Employ additional CSRF protections such as anti-CSRF tokens or same-site cookies to reduce reliance on Content-Type checks alone.
- Review and restrict CORS policies to limit cross-origin requests to trusted domains only.
- Conduct security testing on GraphQL endpoints to detect improper request handling or CSRF vulnerabilities.
- Educate developers on secure API design and the importance of proper header validation.
- Monitor application logs for unusual request patterns that may indicate exploitation attempts.
- If upgrading immediately is not feasible, consider implementing web application firewall (WAF) rules to detect and block suspicious content-type header manipulations.
Description
Mercurius is a GraphQL adapter for Fastify. Prior to version 16.4.0, a cross-site request forgery (CSRF) vulnerability was identified. The issue arises from incorrect parsing of the Content-Type header in requests. Specifically, requests with Content-Type values such as application/x-www-form-urlencoded, multipart/form-data, or text/plain could be misinterpreted as application/json. This misinterpretation bypasses the preflight checks performed by the fetch() API, potentially allowing unauthorized actions to be performed on behalf of an authenticated user. This issue has been patched in version 16.4.0.