Security release of GraphQL fixing a CSRF vulnerability and an access bypass in entity label handling, see:

  1. GraphQL - Moderately critical - Access bypass - SA-CONTRIB-2023-050
  2. GraphQL - Moderately critical - Cross Site Request Forgery - SA-CONTRIB-2023-051

We recommend the following additional security measures:

GraphqL clients should always send the HTTP Content-Type header "application/json" on POST requests (except for file uploads) and the additional custom HTTP header "Apollo-Require-Preflight: true", which forces browser to make a non-simple POST request to prevent CSRF.

The CSRF vulnerability can also be mitigated by setting the SameSite attribute on session cookies to Lax (recommended) or Strict. This might not be suitable for sites that need to share the Drupal session cookie in some way with other sites. Set the following in your site's services.yml file:

parameters:
session.storage.options:
# Session cookies are only used for backend admin accounts, so we restrict
# the cookies to be used only from the backend origin. We don't use "Strict"
# because that also removes cookies whenever an admin navigates from an
# email or chat app, which is inconvenient. See
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
cookie_samesite: Lax

VCS Label
8.x-3.4
Core compatibility
Release type
Packaged Git sha1
712bd7334a4496aa8bc1cc5b94b55110e4bf1a54
Release files
30c1beda6641a1c6bd5a44915031bd66
Release file SHA-1 hash
c7093e61c7badf8ae109b1f71f6e22f581dca277
Release file SHA-256 hash
5a6e107b883ebbdb864e02b296b118978c1e0c992f5e48b8e6acbba1d84c6192
9d19b0b19871f9440fb7aa9b9ff8b658
Release file SHA-1 hash
a00e8349a4e60083aa1bacbd8d7c782fca5f5738
Release file SHA-256 hash
6de0e49a84ced11cbb250b8de6605b1025a9aefddcc8d892864b9869e6a715d9