CVE-2022-36359: Django Django Vulnerable To Reflected File Vulnerability
HIGHCVE-2022-36359 is a HIGH (CVSS 8.8) django vulnerable to reflected file vulnerability (CWE-494: Download of Code Without Integrity Check) affecting Django libraries in the PyPI ecosystem. The issue involves django vulnerable to reflected file download attack. Remediation is available by upgrading affected packages to version 3.2.15, 4.0.7.
CVE-2022-36359 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-36359
To remediate this vulnerability, upgrade all affected Django 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 Django>=3.2.15
pip install Django>=4.0.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Django
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-36359, inspect your installed packages using pip:
pip show Django
Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.15), your application is affected.
Note: The pip show Django command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-494: Download of Code Without Integrity Check, where the product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code. In Django, 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-2022-36359 Affected Django Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
< 3.2.15
|
3.2.15
|
|
Django
|
PyPI |
≥ 4.0
< 4.0.7
|
4.0.7
|
References
Frequently Asked Questions
What is CVE-2022-36359?
Which Django versions are affected?
What version fixes CVE-2022-36359?
Is Django affected?
What is the CVSS score of CVE-2022-36359?
What CWE is associated with CVE-2022-36359?
How can I check PyPI dependencies for CVE-2022-36359?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8x94-hmjh-97hq",
"modified" : "2024-12-18T22:08:23Z",
"published" : "2022-08-11T14:49:12Z",
"aliases" : [ "CVE-2022-36359" ],
"summary" : "Django vulnerable to Reflected File Download attack",
"details" : "An issue was discovered in the HTTP FileResponse class in Django 3.2 before 3.2.15 and 4.0 before 4.0.7. An application is vulnerable to a reflected file download (RFD) attack that sets the Content-Disposition header of a FileResponse when the filename is derived from user-supplied input.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.15"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0"
}, {
"fixed" : "4.0.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36359"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/b3e4494d759202a3b6bf247fd34455bf13be5b80"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/b7d9529cbe0af4adabb6ea5d01ed8dcce3668fb3"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/bd062445cffd3f6cc6dcd20d13e2abed818fa173"
}, {
"type" : "WEB",
"url" : "https://docs.djangoproject.com/en/4.0/releases/security"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-245.yaml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/g/django-announce/c/8cz--gvaJr4"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220915-0008"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2022/dsa-5254"
}, {
"type" : "WEB",
"url" : "https://www.djangoproject.com/weblog/2022/aug/03/security-releases"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2022/08/03/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-494" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-08-11T14:49:12Z",
"nvd_published_at" : "2022-08-03T14:15:00Z"
}
}