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 package | Versions | Reported by |
|---|---|---|
| strawberry-graphql strawberry | < 0.243.0 | CVE List |
| strawberry-graphql (PyPI) | before 0.243.0, before 37265b230e511480a9ceace492f9f6a484be1387 | GitHub Advisory Database, PyPA Advisory Database |
| strawberryrocks strawberry | before 0.243.0 | NVD |
All scores
| GitHub_M | 4.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L |
| GitHub | 4.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N |
| NVD | 8.0high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 8.0high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-47082 changed 2024-09-25 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-79gp-q4wv-33fr changed 2025-01-21 | CC-BY-4.0 |
| NVD | CVE-2024-47082 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2024-171 changed 2025-01-18 | CC-BY-4.0 |