CVE-2024-47082: Strawberry graphql Cross-Site Request Forgery (CSRF) Vulnerability
MODERATECVE-2024-47082 is a MODERATE (CVSS 4.6) cross-site request forgery (csrf) vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Strawberry graphql libraries in the PyPI ecosystem. The issue involves cross-site request forgery (csrf) in strawberry-graphql. Remediation is available by upgrading affected packages to version 0.243.0.
CVE-2024-47082 at a Glance
Security Impact
CVSS: 4.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L).
How to Fix CVE-2024-47082
To remediate this vulnerability, upgrade all affected Strawberry graphql dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install strawberry-graphql>=0.243.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show strawberry-graphql
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-47082, inspect your installed packages using pip:
pip show strawberry-graphql
Analyze the terminal output to locate any version of Strawberry graphql in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.243.0), your application is affected.
Note: The pip show strawberry-graphql command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Strawberry graphql, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-47082 Affected Strawberry graphql Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
strawberry-graphql
|
PyPI |
< 0.243.0
|
0.243.0
|
References
Frequently Asked Questions
What is CVE-2024-47082?
Which Strawberry graphql versions are affected?
What version fixes CVE-2024-47082?
Is strawberry-graphql affected?
What is the CVSS score of CVE-2024-47082?
What CWE is associated with CVE-2024-47082?
How can I check PyPI dependencies for CVE-2024-47082?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-79gp-q4wv-33fr",
"modified" : "2025-01-21T18:27:00Z",
"published" : "2024-09-25T18:21:19Z",
"aliases" : [ "CVE-2024-47082" ],
"summary" : "Cross-Site Request Forgery (CSRF) in strawberry-graphql",
"details" : "### Impact\n\nMultipart file upload support as defined in the [GraphQL multipart request specification](https://github.com/jaydenseric/graphql-multipart-request-spec) 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.\nAdditionally, the Django HTTP view integration, in particular, had an exemption for Django's built-in CSRF protection (i.e., the `CsrfViewMiddleware` middleware) by default.\n\nIn affect, all Strawberry integrations were vulnerable to CSRF attacks by default.\n\n### Patches\n\nVersion `v0.243.0` is the first `strawberry-graphql` including a patch. Check out our [documentation](https://strawberry.rocks/docs/breaking-changes/0.243.0) for additional details and upgrade instructions.\n\n### References\n\n- [Strawberry upgrade guide](https://strawberry.rocks/docs/breaking-changes/0.243.0)\n- [Multipart Upload Security Implications](https://github.com/jaydenseric/graphql-multipart-request-spec/blob/master/readme.md#security)\n\n### Credits\n\n- [Thomas Grainger](https://github.com/graingert)\n- [Arthur Bayr](https://github.com/speedy1991)\n- [Jonathan Ehwald](https://github.com/DoctorJohn)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "strawberry-graphql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.243.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-79gp-q4wv-33fr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47082"
}, {
"type" : "WEB",
"url" : "https://github.com/strawberry-graphql/strawberry/commit/37265b230e511480a9ceace492f9f6a484be1387"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/strawberry-graphql/PYSEC-2024-171.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/strawberry-graphql/strawberry"
}, {
"type" : "WEB",
"url" : "https://strawberry.rocks/docs/breaking-changes/0.243.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-25T18:21:19Z",
"nvd_published_at" : "2024-09-25T18:15:05Z"
}
}