Skip to main content
← All vulnerabilities
CVE-2025-64166GHSA-V66J-6WWF-JC57

Mercurius: Incorrect Content-Type parsing can lead to CSRF attack

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 16.4.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • mercurius-js mercurius

    fixed in 16.4.0

  • mercuriusnpm

    fixed in 16.4.0

References 3

GitHub · mercurius-js/mercurius