DRUPAL-CONTRIB-2023-051 The GraphQL module enables you to build GraphQL APIs which can include data fetching through Queries and data updates (create, update, delete) through mutations.
A CSRF vulnerability in the Drupal GraphQL module allows attackers to execute mutations on behalf of authenticated users visiting malicious sites.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is DRUPAL-CONTRIB-2023-051?
DRUPAL-CONTRIB-2023-051 is a vulnerability in drupal/graphql, published on 8 Nov 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
The GraphQL module enables you to build GraphQL APIs which can include data fetching through Queries and data updates (create, update, delete) through mutations.
The module does not sufficiently validate incoming requests that are made from domains other than the one serving the GraphQL endpoint. In case a user visits a malicious site, that site may make requests on the users behalf which can lead to the execution of mutations, exposing a CSRF vulnerability. Whether data is returned to the malicious site depends on your sites CORS configuration.
This vulnerability is mitigated by the fact that a user with access to the API must have an active session cookie while visiting a malicious site. This vulnerability is also mitigated by restricting session cookies with the SameSite attribute (see solution below).
Which versions are affected by DRUPAL-CONTRIB-2023-051?
Linux distribution packages (1)
drupal/graphql Packagist:https://packages.drupal.org/8 | All versions | 3.4.0, 4.6.0 |
How do I fix DRUPAL-CONTRIB-2023-051?
Apply the vendor's patch.
Is DRUPAL-CONTRIB-2023-051 being exploited?
There is no known exploitation of DRUPAL-CONTRIB-2023-051 in the wild and no public exploit code.