CVE-2023-24580: Django Remote Code Execution Vulnerability
HIGHCVE-2023-24580 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Django libraries in the PyPI ecosystem. The issue involves resource exhaustion in django. Remediation is available by upgrading affected packages to version 3.2.18, 4.1.7, 4.0.10.
CVE-2023-24580 at a Glance
Security Impact
CVSS: 7.5
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:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-24580
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.18
pip install Django>=4.1.7
pip install Django>=4.0.10
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-2023-24580, 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.18), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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-2023-24580 Affected Django Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
≥ 3.2a1
< 3.2.18
|
3.2.18
|
|
Django
|
PyPI |
≥ 4.1a1
< 4.1.7
|
4.1.7
|
|
Django
|
PyPI |
≥ 4.0a1
< 4.0.10
|
4.0.10
|
References
Frequently Asked Questions
What is CVE-2023-24580?
Which Django versions are affected?
What version fixes CVE-2023-24580?
Is Django affected?
What is the CVSS score of CVE-2023-24580?
What CWE is associated with CVE-2023-24580?
How can I check PyPI dependencies for CVE-2023-24580?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2hrw-hx67-34x6",
"modified" : "2025-03-19T15:39:39Z",
"published" : "2023-02-15T03:30:47Z",
"aliases" : [ "CVE-2023-24580" ],
"summary" : "Resource exhaustion in Django",
"details" : "An issue was discovered in the Multipart Request Parser in Django 3.2 before 3.2.18, 4.0 before 4.0.10, and 4.1 before 4.1.7. Passing certain inputs (e.g., an excessive number of parts) to multipart forms could result in too many open files or memory exhaustion, and provided a potential vector for a denial-of-service attack.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2a1"
}, {
"fixed" : "3.2.18"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1a1"
}, {
"fixed" : "4.1.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0a1"
}, {
"fixed" : "4.0.10"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-24580"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/628b33a854a9c68ec8a0c51f382f304a0044ec92"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/83f1ea83e4553e211c1c5a0dfc197b66d4e50432"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/a665ed5179f5bbd3db95ce67286d0192eff041d8"
}, {
"type" : "WEB",
"url" : "https://www.djangoproject.com/weblog/2023/feb/14/security-releases"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20230316-0006"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YJB6FUBBLVKKG655UMTLQNN6UQ6EDLSP"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VZS4G6NSZWPTVXMMZHJOJVQEPL3QTO77"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI"
}, {
"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/FKYVMMR7RPM6AHJ2SBVM2LO6D3NGFY7B"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YJB6FUBBLVKKG655UMTLQNN6UQ6EDLSP"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VZS4G6NSZWPTVXMMZHJOJVQEPL3QTO77"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FKYVMMR7RPM6AHJ2SBVM2LO6D3NGFY7B"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/02/msg00023.html"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#%21forum/django-announce"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!forum/django-announce"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2023-13.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "https://docs.djangoproject.com/en/4.1/releases/security"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2023/02/14/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-15T17:42:14Z",
"nvd_published_at" : "2023-02-15T01:15:00Z"
}
}