# CVE-2025-64166: Mercurius: Incorrect Content-Type parsing can lead to CSRF attack

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-05T15:31:45.641Z
- Modified: 2026-06-17T09:53:56.630Z
- Also known as: GHSA-v66j-6wwf-jc57
- Weaknesses: CWE-352
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- mercurius-js mercurius: < 16.4.0
- mercurius (npm): before 16.4.0
- mercurius_project mercurius: before 16.4.0

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`

## References

- <https://github.com/mercurius-js/mercurius/security/advisories/GHSA-v66j-6wwf-jc57> (exploit, patch, vendor-advisory, web)
- <https://github.com/mercurius-js/mercurius/pull/1187> (issue-tracking, patch, web)
- <https://github.com/mercurius-js/mercurius/commit/962d402ec7a92342f4a1b7f5f04af01776838c3c> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-64166> (advisory)
- <https://github.com/mercurius-js/mercurius> (package)

## Sources

- CVE List: [CVE-2025-64166](https://www.cve.org/CVERecord?id=CVE-2025-64166), CVE Terms of Use, modified 2026-03-05
- GitHub Advisory Database: [GHSA-v66j-6wwf-jc57](https://github.com/advisories/GHSA-v66j-6wwf-jc57), CC-BY-4.0, modified 2026-03-05
- NVD: [CVE-2025-64166](https://nvd.nist.gov/vuln/detail/CVE-2025-64166), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-64166 · Whole record: https://cve.day/CVE-2025-64166.json · Rebuilt by cve.day 2026-11-25T22:59:11.850Z
