Skip to main content

Cross-Site Request Forgery (CSRF)

CVE-2025-64166

Severity Medium
Score 5.4/10

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.

  • LOW
  • NETWORK
  • LOW
  • UNCHANGED
  • REQUIRED
  • NONE
  • LOW
  • NONE

CWE-352 - Cross-Site Request Forgery (CSRF)

Cross-Site Request Forgery (CSRF) is a vulnerability that allows an attacker to make arbitrary requests in an authenticated vulnerable web application and disrupt the integrity of the victim’s session. The impact of a successful CSRF attack may range from minor to severe, depending upon the capabilities exposed by the vulnerable application and privileges of the user. An attacker may force the user to perform state-changing requests like transferring funds, changing their email address or password etc. However, if an administrative level account is affected, it may compromise the whole web application and associated sensitive data.

Advisory Timeline

  • Published