# DRUPAL-CONTRIB-2023-051 - The GraphQL module enables you to build GraphQL APIs which can include data fetching through…

Source: https://junglewise.ai/threats/drupal-contrib-2023-051-the-graphql-module-enables-you-to-build-graphql-e0f2961a  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-11-08  
License: CC BY 4.0 with a link back

Severity: info · Published 2023-11-08

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

Technologies: [Packagist:Https://Packages.Drupal.Org/8 Drupal/Graphql](https://junglewise.ai/threats/technologies/drupal-graphql). Vendors: [Packagist:Https://Packages.Drupal.Org/8](https://junglewise.ai/threats/vendors/packagist-https-packages-drupal-org-8).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 8 November 2023.

**Which products and versions are affected?** Packagist:Https://Packages.Drupal.Org/8 Drupal/Graphql ECOSYSTEM:introduced=0,fixed=3.4.0|ECOSYSTEM:introduced=4.0.0,fixed=4.6.0.

**Is there a fix for This vulnerability?** Yes. Packagist:Https://Packages.Drupal.Org/8 Drupal/Graphql: upgrade to 3.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected?** Check whether you run Packagist:Https://Packages.Drupal.Org/8 Drupal/Graphql at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Packagist:Https://Packages.Drupal.Org/8 Drupal/Graphql: upgrade to 3.4.0 or later

## Affected products

- Packagist:Https://Packages.Drupal.Org/8 Drupal/Graphql ECOSYSTEM:introduced=0,fixed=3.4.0|ECOSYSTEM:introduced=4.0.0,fixed=4.6.0

## Related threats

- [DRUPAL-CONTRIB-2023-050 - This module lets you craft and expose a GraphQL schema for Drupal 9 and 10. The module…](https://junglewise.ai/threats/drupal-contrib-2023-050-this-module-lets-you-craft-and-expose-a-graphql-3f7f96b3)
- [Unrestricted Upload of File with Dangerous Type in Drupal core](https://junglewise.ai/threats/cve-2020-13675-drupal-contrib-2021-029-this-advisory-addresses-a-similar-issue)
- [DRUPAL-CONTRIB-2021-013 - This module lets you craft and expose a GraphQL web service API. The module does not…](https://junglewise.ai/threats/drupal-contrib-2021-013-this-module-lets-you-craft-and-expose-a-graphql-9adfcd0a)
