CVE-2025-64166

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

MEDIUM
5.4
CVSS Score
Published: March 5, 2026 at 03:31 PM UTC
Updated: June 17, 2026 at 09:53 AM UTC
2 products affected across 2 vendorsMercuriusProject Mercurius

Using mercurius by mercurius-js?

Get instant alerts when new vulnerabilities affect mercurius - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.4
Exploit prediction
EPSS 0.2%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 16.4.0
Affected range stops below 16.4.0, so it looks safe — our inference, not a vendor statement

References (3)

x_refsource_CONFIRMExploitPatchVendor Advisory
Source: cverecord
https://github.com/mercurius-js/mercurius/security/advisories/GHSA-v66j-6wwf-jc57
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/mercurius-js/mercurius/pull/1187

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.4MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-352

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card