CVE-2007-0404: Django Django Arbitrary Code Execution Vulnerability
HIGHCVE-2007-0404 is a HIGH django arbitrary code execution vulnerability (General Security Weakness) affecting Django libraries in the PyPI ecosystem. The issue involves django arbitrary code execution. Remediation is available by upgrading affected packages to version 1.0.
CVE-2007-0404 at a Glance
How to Fix CVE-2007-0404
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>=1.0
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-2007-0404, 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 1.0), 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 General Security Weakness. 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-2007-0404 Affected Django Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
≥ 0.95
< 1.0
All 1 versions
0.95
|
1.0
|
References
Frequently Asked Questions
What is CVE-2007-0404?
Which Django versions are affected?
What version fixes CVE-2007-0404?
Is Django affected?
What CWE is associated with CVE-2007-0404?
How can I check PyPI dependencies for CVE-2007-0404?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qc99-g3wm-hgxr",
"modified" : "2025-04-09T14:34:39Z",
"published" : "2022-05-01T17:44:04Z",
"aliases" : [ "CVE-2007-0404" ],
"summary" : "Django Arbitrary Code Execution",
"details" : "`bin/compile-messages.py` in Django 0.95 does not quote argument strings before invoking the msgfmt program through the os.system function, which allows attackers to execute arbitrary commands via shell metacharacters in a (1) .po or (2) .mo file.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.95"
}, {
"fixed" : "1.0"
} ]
} ],
"versions" : [ "0.95" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2007-0404"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/518d406e53"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/a132d411c6986418ee6c0edc331080aa792fee6e"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=407519"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/31627"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "http://code.djangoproject.com/changeset/3592"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-14T17:18:37Z",
"nvd_published_at" : "2007-01-23T00:28:00Z"
}
}