CVE-2025-64166 json
Mercurius: Incorrect Content-Type parsing can lead to CSRF attack
published 8mo ago modified 4mo ago also EUVD-2025-208313 , GHSA-v66j-6wwf-jc57
- cvss
- 5.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 7%
- public exploits
- 0
- none known
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.
Patch / fix
- npm mercurius 16.4.0
- mercurius_project mercurius 16.4.0
Is CVE-2025-64166 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 8mo ago
Exploit prediction
0.18% chance of exploitation in the next 30 days, higher than 7% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/mercurius-js/mercurius/security/advisories/GHSA-v66j-6wwf-jc57 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| GitHub | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | mercurius | <16.4.0 |
16.4.0 |
Affected products
- mercurius-js mercurius
Classification
- Weakness
-
- CWE-352 Cross-Site Request Forgery
References
-
github.com
/mercurius-js/mercurius/pull/1187
web, issue-tracking, patch
-
github.com
/mercurius-js/mercurius/commit/962d402ec7a92342f4a1b7f5f04af01776838c3c
web, patch
-
github.com
/mercurius-js/mercurius/security/advisories/GHSA-v66j-6wwf-jc57
exploit, web, patch, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-64166
advisory
-
github.com
/mercurius-js/mercurius
package
Sources
- CVE List CVE-2025-64166
- GitHub Advisory GHSA-v66j-6wwf-jc57
- NVD CVE-2025-64166
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.