{"answers":{"affected":"2 open source packages ship an affected version, including mercurius. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64166 exists.","fix":"Upgrade mercurius to 16.4.0 or later.","what":"CVE-2025-64166 is a medium-severity vulnerability in mercurius-js mercurius, published on 5 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-64166 and fix it if it is affected.\n\nWhat it is: CVE-2025-64166 is a medium-severity vulnerability in mercurius-js mercurius, published on 5 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64166 exists.\n\nAffected packages and fixed versions:\n- mercurius (npm): affected all versions; fixed in 16.4.0\n- mercurius (npm): affected all versions; fixed in 16.4.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-64166/ (Markdown: https://insights.sbomify.com/CVE-2025-64166/index.md)","id":"CVE-2025-64166","markdown":"https://insights.sbomify.com/CVE-2025-64166/index.md","name":"CVE-2025-64166","record":{"aliases":["GHSA-v66j-6wwf-jc57"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"GraphQL adapter library","requires_auth":"none","summary":"Incorrect Content-Type parsing in Mercurius allows CSRF attacks, enabling unauthorized actions on behalf of authenticated users.","user_interaction":"required","vuln_class":"csrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"mercurius","vendor":"mercurius_project"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Mercurius: Incorrect Content-Type parsing can lead to CSRF attack","id":"CVE-2025-64166","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"csrf","year":"2025"},"n_packages":2,"n_references":3,"next":{"headline":"Combodo iTop vulnerable to reflected XSS in webservices/export.php","id":"CVE-2025-64167"},"packages":[{"ecosystem":"npm","fixed":["16.4.0"],"introduced":["0"],"last_affected":[],"package":"mercurius","purl":null,"source":"GHSA-v66j-6wwf-jc57"},{"ecosystem":"npm","fixed":["16.4.0"],"introduced":["0"],"last_affected":[],"package":"mercurius","purl":"pkg:npm/mercurius","source":"GHSA-v66j-6wwf-jc57"}],"prev":{"headline":"DataEase is vulnerable to Oracle JNDI Injection","id":"CVE-2025-64164"},"products":["mercurius"],"published":"2026-03-05","related":[{"cvss_score":7.5,"headline":"Uncaught Exception in mercurius","id":"CVE-2021-43801","kev_date_added":null,"published":"2021-12-13"},{"cvss_score":5.3,"headline":"Mercurius is vulnerable to denial of service (DoS) when using subscriptions","id":"CVE-2023-22477","kev_date_added":null,"published":"2023-01-09"},{"cvss_score":2.7,"headline":"Mercurius: queryDepth limit bypassed for WebSocket subscriptions","id":"CVE-2026-30241","kev_date_added":null,"published":"2026-03-06"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-03-05","vendors":["mercurius-js"]},"summary":"Incorrect Content-Type parsing in Mercurius allows CSRF attacks, enabling unauthorized actions on behalf of authenticated users.","url":"https://insights.sbomify.com/CVE-2025-64166/"}