CVE-2024-47082
JSON

4.6medium

Strawberry GraphQL Cross-Site Request Forgery (CSRF) vulnerability

Severity
4.6medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.24% (higher than 16% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-79gp-q4wv-33frPYSEC-2024-171

Description

Strawberry GraphQL is a library for creating GraphQL APIs. Prior to version 0.243.0, multipart file upload support as defined in the GraphQL multipart request specification was enabled by default in all Strawberry HTTP view integrations. This made all Strawberry HTTP view integrations vulnerable to cross-site request forgery (CSRF) attacks if users did not explicitly enable CSRF preventing security mechanism for their servers. Additionally, the Django HTTP view integration, in particular, had an exemption for Django's built-in CSRF protection (i.e., the `CsrfViewMiddleware` middleware) by default. In affect, all Strawberry integrations were vulnerable to CSRF attacks by default. Version `v0.243.0` is the first `strawberry-graphql` including a patch.

Affected

Product or packageVersionsReported by
strawberry-graphql strawberry< 0.243.0CVE List
strawberry-graphql (PyPI)before 0.243.0, before 37265b230e511480a9ceace492f9f6a484be1387GitHub Advisory Database, PyPA Advisory Database
strawberryrocks strawberrybefore 0.243.0NVD

All scores

GitHub_M4.6medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
GitHub4.6medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
NVD8.0high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
PyPA Advisory Database8.0high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-352

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Strawberry GraphQL is a library for creating GraphQL APIs. Prior to version 0.243.0, multipart file upload support as defined in the GraphQL multipart request specification was enabled by default in all Strawberry HTTP view integrations. This made all Strawberry HTTP view integrations vulnerable to cross-site request forgery (CSRF) attacks if users did not explicitly enable CSRF preventing security mechanism for their servers. Additionally, the Django HTTP view integration, in particular, had an exemption for Django's built-in CSRF protection (i.e., the `CsrfViewMiddleware` middleware) by default. In affect, all Strawberry integrations were vulnerable to CSRF attacks by default. Version `v0.243.0` is the first `strawberry-graphql` including a patch.

GitHub Advisory Database
Impact

Multipart file upload support as defined in the GraphQL multipart request specification was enabled by default in all Strawberry HTTP view integrations. This made all Strawberry HTTP view integrations vulnerable to CSRF attacks if users did not explicitly enable CSRF preventing security mechanism for their servers. Additionally, the Django HTTP view integration, in particular, had an exemption for Django's built-in CSRF protection (i.e., the CsrfViewMiddleware middleware) by default.

In affect, all Strawberry integrations were vulnerable to CSRF attacks by default.

Patches

Version v0.243.0 is the first strawberry-graphql including a patch. Check out our documentation for additional details and upgrade instructions.

References
Credits
NVD (es)

Strawberry GraphQL es una librería para crear API de GraphQL. Antes de la versión 0.243.0, la compatibilidad con la carga de archivos multiparte, tal como se define en la especificación de solicitud multiparte de GraphQL, estaba habilitada de forma predeterminada en todas las integraciones de vistas HTTP de Strawberry. Esto hacía que todas las integraciones de vistas HTTP de Strawberry fueran vulnerables a ataques de Cross-Site Request Forgery (CSRF) si los usuarios no habilitaban explícitamente el mecanismo de seguridad para evitar CSRF en sus servidores. Además, la integración de vistas HTTP de Django, en particular, tenía una exención para la protección CSRF incorporada de Django (es decir, el middleware `CsrfViewMiddleware`) de forma predeterminada. En efecto, todas las integraciones de Strawberry eran vulnerables a ataques CSRF de forma predeterminada. La versión `v0.243.0` es la primera `strawberry-graphql` que incluye un parche.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-47082 changed 2024-09-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-79gp-q4wv-33fr changed 2025-01-21CC-BY-4.0
NVDCVE-2024-47082 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-171 changed 2025-01-18CC-BY-4.0