CVE-2025-64166
MEDIUM 5.4CVSS 3.1Mercurius: Incorrect Content-Type parsing can lead to CSRF attack
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.
- Published
- 5 Mar 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-352
- Also known as
- GHSA-v66j-6wwf-jc57
- Sources
- NVDJSONOSV GHSA-v66j-6wwf-jc57JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mercurius_project | mercuriuscpe:2.3:a:mercurius_project:mercurius:*:*:*:*:*:node.js:*:* |
< 16.4.0 | 16.4.0 |
| OSV | npm | mercurius | < 16.4.0 | 16.4.0 |
References
- https://github.com/mercurius-js/mercurius/commit/962d402ec7a92342f4a1b7f5f04af01776838c3c · Patch, WEB
- https://github.com/mercurius-js/mercurius/pull/1187 · Issue Tracking, Patch, WEB
- https://github.com/mercurius-js/mercurius/security/advisories/GHSA-v66j-6wwf-jc57 · Exploit, Patch, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-64166 · ADVISORY
- https://github.com/mercurius-js/mercurius · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 5 Mar 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 5 Mar 2026)