CVE-2024-47082 Overview
CVE-2024-47082 is a Cross-Site Request Forgery (CSRF) vulnerability [CWE-352] affecting Strawberry GraphQL, a Python library for building GraphQL APIs. Prior to version 0.243.0, multipart file upload support defined in the GraphQL multipart request specification was enabled by default in all Strawberry HTTP view integrations. This default configuration exposed applications to CSRF attacks unless developers explicitly enabled a CSRF prevention mechanism. The Django integration compounded the risk by exempting Strawberry views from Django's built-in CsrfViewMiddleware. Version 0.243.0 disables multipart uploads by default and restores standard CSRF protections.
Critical Impact
Attackers can perform authenticated state-changing GraphQL operations on behalf of victim users through crafted cross-origin multipart requests, leading to high impact on confidentiality, integrity, and availability.
Affected Products
- Strawberry GraphQL (strawberry-graphql) versions prior to 0.243.0
- Django HTTP view integration (with default CSRF exemption)
- ASGI, AIOHTTP, and other Strawberry HTTP view integrations
Discovery Timeline
- 2024-09-25 - CVE-2024-47082 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-47082
Vulnerability Analysis
Strawberry GraphQL enabled multipart file upload processing by default across all HTTP view integrations. Standard GraphQL requests using application/json are typically rejected by browsers as non-simple requests, triggering CORS preflight checks that mitigate CSRF. Multipart requests using multipart/form-data, however, qualify as CORS-simple requests and bypass preflight validation. An attacker hosting a malicious page can submit forged GraphQL mutations from a victim's authenticated browser session. The Django integration further exempted Strawberry endpoints from CsrfViewMiddleware, removing the framework's default token-based protection. Successful exploitation permits attackers to invoke any GraphQL mutation the authenticated user is authorized to perform.
Root Cause
The root cause is an insecure default configuration. The constructor parameter multipart_uploads_enabled defaulted to True, and the Django view opted out of CSRF middleware to accommodate uploads. Together these defaults left applications unprotected unless developers added explicit safeguards.
Attack Vector
The attack requires network access to a Strawberry-backed GraphQL endpoint and user interaction, such as visiting an attacker-controlled site while authenticated. The attacker's page submits a crafted multipart/form-data POST containing a GraphQL operation. The browser attaches the victim's session cookies, and the server processes the mutation as if the victim initiated it.
# Patch excerpt: strawberry/aiohttp/views.py and strawberry/asgi/__init__.py
GRAPHQL_WS_PROTOCOL,
),
connection_init_wait_timeout: timedelta = timedelta(minutes=1),
+ multipart_uploads_enabled: bool = False,
) -> None:
self.schema = schema
self.allow_queries_via_get = allow_queries_via_get
# Source: https://github.com/strawberry-graphql/strawberry/commit/37265b230e511480a9ceace492f9f6a484be1387
The patch flips the default so multipart uploads must be explicitly opted in, closing the CSRF surface by default.
Detection Methods for CVE-2024-47082
Indicators of Compromise
- Unexpected POST requests to GraphQL endpoints with Content-Type: multipart/form-data originating from cross-origin Referer or Origin headers.
- GraphQL mutation logs showing state changes correlated with recent user visits to untrusted third-party sites.
- Application logs indicating Strawberry versions earlier than 0.243.0 in production deployments.
Detection Strategies
- Inventory Python dependencies and flag any installation of strawberry-graphql<0.243.0.
- Inspect HTTP access logs for multipart POSTs to GraphQL routes and cross-reference Origin against allowed domains.
- Review Django settings for views that bypass CsrfViewMiddleware or use @csrf_exempt on GraphQL endpoints.
Monitoring Recommendations
- Alert on GraphQL mutations initiated with cross-site Origin headers or missing CSRF tokens.
- Monitor for anomalous mutation volumes tied to a single authenticated session.
- Track deployment manifests and SBOMs for reintroduction of vulnerable Strawberry versions.
How to Mitigate CVE-2024-47082
Immediate Actions Required
- Upgrade strawberry-graphql to version 0.243.0 or later across all services.
- Audit HTTP view integrations to confirm multipart_uploads_enabled remains False unless uploads are required.
- Re-enable Django CsrfViewMiddleware protection on all Strawberry GraphQL endpoints.
Patch Information
The fix is delivered in strawberry-graphql version 0.243.0 via commit 37265b2. It changes the multipart_uploads_enabled default to False in the AIOHTTP, ASGI, Django, and related views. Review the GitHub Security Advisory GHSA-79gp-q4wv-33fr and the Strawberry 0.243.0 Breaking Changes documentation for migration guidance.
Workarounds
- If upgrading is not immediately possible, explicitly set multipart_uploads_enabled=False on each Strawberry view constructor.
- Enforce CSRF token validation and same-site cookie attributes (SameSite=Lax or Strict) on session cookies.
- Restrict allowed request Content-Type values at a reverse proxy or WAF layer to block unexpected multipart submissions to GraphQL endpoints.
# Upgrade Strawberry GraphQL to the patched release
pip install --upgrade 'strawberry-graphql>=0.243.0'
# Verify the installed version
python -c "import strawberry; print(strawberry.__version__)"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

