CVE-2007-0405: Django Django Improper Access Control Vulnerability
MODERATECVE-2007-0405 is a MODERATE django improper access control vulnerability (General Security Weakness) affecting Django libraries in the PyPI ecosystem. The issue involves django improper access control. Remediation is available by upgrading affected packages to version 1.0.
CVE-2007-0405 at a Glance
How to Fix CVE-2007-0405
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-0405, 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-0405 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-0405?
Which Django versions are affected?
What version fixes CVE-2007-0405?
Is Django affected?
What CWE is associated with CVE-2007-0405?
How can I check PyPI dependencies for CVE-2007-0405?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mwv2-398h-v489",
"modified" : "2025-04-09T14:34:50Z",
"published" : "2022-05-01T17:44:04Z",
"aliases" : [ "CVE-2007-0405" ],
"summary" : "Django Improper Access Control",
"details" : "The LazyUser class in the AuthenticationMiddleware for Django 0.95 does not properly cache the user name across requests, which allows remote authenticated users to gain the privileges of a different user.",
"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-0405"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/3c5782287e"
}, {
"type" : "WEB",
"url" : "https://github.com/django/django/commit/e89f0a65581f82a5740bfe989136cea75d09cd67"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/31628"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "http://code.djangoproject.com/changeset/3754"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-14T17:18:53Z",
"nvd_published_at" : "2007-01-23T00:28:00Z"
}
}