Junglewise Threat Intelligence

CVE-2025-64166: Mercurius incorrect Content-Type parsing CSRF vulnerability

CVE-2025-64166 · Severity: low · CVSS 3.1 · Published 2026-03-05

Technologies: mercurius (npm). Vendors: npm.

Executive brief

Mercurius is a GraphQL framework for Node.js applications that handles incoming requests. A flaw in how it parses the Content-Type header allows attackers to bypass browser security controls and trick authenticated users into unknowingly performing actions (such as data modifications or deletions) on malicious websites. This could lead to unauthorized changes to user data or application state without the user's awareness.

Technical details

The vulnerability is a Cross-Site Request Forgery (CSRF) issue (CWE-352) stemming from incorrect Content-Type header parsing in Mercurius. Requests with Content-Type headers such as application/x-www-form-urlencoded, multipart/form-data, or text/plain are misinterpreted as application/json, bypassing browser preflight checks enforced by the Fetch API and CORS. An unauthenticated attacker can craft a malicious request from a cross-origin context that, when visited by an authenticated user, performs unauthorized GraphQL mutations on behalf of that user. The vulnerability affects Mercurius versions up to 16.3.0 and is fixed in version 16.4.0. Mitigation involves implementing CSRF protection as detailed in pull request #1187.

Affected products

  • Mercurius Mercurius ≤ 16.3.0

Timeline

  • 2026-03-05: disclosed
  • 2026-03-05: patched: fixed in version 16.4.0

References

Related threats