Skip to main content
VulnerabilityPublished

CVE-2025-64166: mercurius · Cross-Site Request Forgery (CSRF)

Affects mercuriusSource CVE Database V5

0
Compare

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

CVSS 3.1 base score
5.4Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 5 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
mercurius-jsmercuriusAffected
  • <16.4.0
Fixed in
  • 16.4.0
npmmercurius-js/mercuriuspkg:npm/mercurius-js/mercuriusOther threatsAffected
  • <16.4.0
Fixed in
  • 16.4.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Upgrade mercurius to version 16.4.0 or later immediately to apply the official patch that corrects Content-Type parsing.
  2. Implement strict Content-Type validation on the server side to reject or properly handle unexpected content types.
  3. Employ additional CSRF protections such as anti-CSRF tokens or same-site cookies to reduce reliance on Content-Type checks alone.
  4. Review and restrict CORS policies to limit cross-origin requests to trusted domains only.
  5. Conduct security testing on GraphQL endpoints to detect improper request handling or CSRF vulnerabilities.
  6. Educate developers on secure API design and the importance of proper header validation.
  7. Monitor application logs for unusual request patterns that may indicate exploitation attempts.
  8. 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.

References

Community reviews

Loading reviews…