CVE-2025-64166

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

Published Mar 5, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v66j-6wwf-jc57 Mercurius: Incorrect Content-Type parsing can lead to CSRF attack
History
Type Values Removed Values Added
CPEs cpe:2.3:a:mercurius_project:mercurius:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
First Time appeared Mercurius-js
Mercurius-js mercurius
Mercurius Project
Mercurius Project mercurius
Vendors & Products Mercurius-js
Mercurius-js mercurius
Mercurius Project
Mercurius Project mercurius
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Mercurius: Incorrect Content-Type parsing can lead to CSRF attack
Weaknesses CWE-352
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 5, 2026, 4:34 PM
Reserved
Oct 28, 2025, 9:07 PM
Status
Analyzed
Published
Mar 5, 2026, 4:16 PM
Modified
Jun 17, 2026, 9:53 AM