CVE-2011-4140: Django Django Cross-Site Request Forgery Vulnerability Vulnerability
HIGHCVE-2011-4140 is a HIGH (CVSS 7.5) django cross-site request forgery vulnerability vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Django libraries in the PyPI ecosystem. The issue involves django cross-site request forgery vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2011-4140 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:H/A:N).
How to Fix CVE-2011-4140
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>=Latest secure release
pip install Django>=Latest secure release
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-2011-4140, 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 the patched release), 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-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 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-2011-4140 Affected Django Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Django
|
PyPI |
≤ 1.2.7
|
|
|
Django
|
PyPI |
≥ 1.3
≤ 1.3.1
|
|
References
Frequently Asked Questions
What is CVE-2011-4140?
Which Django versions are affected?
What version fixes CVE-2011-4140?
Is Django affected?
What is the CVSS score of CVE-2011-4140?
What CWE is associated with CVE-2011-4140?
How can I check PyPI dependencies for CVE-2011-4140?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h95j-h2rv-qrg4",
"modified" : "2024-09-16T22:05:38Z",
"published" : "2018-07-23T19:51:19Z",
"aliases" : [ "CVE-2011-4140" ],
"summary" : "Django Cross-Site Request Forgery vulnerability",
"details" : "The CSRF protection mechanism in Django through 1.2.7 and 1.3.x through 1.3.1 does not properly handle web-server configurations supporting arbitrary HTTP Host headers, which allows remote attackers to trigger unauthenticated forged requests via vectors involving a DNS CNAME record and a web page containing JavaScript code.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.2.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "Django"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.3"
}, {
"last_affected" : "1.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-4140"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=737366"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-h95j-h2rv-qrg4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django/django"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2011-5.yaml"
}, {
"type" : "WEB",
"url" : "https://hermes.opensuse.org/messages/14700881"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20140806062902/http://secunia.com/advisories/46614"
}, {
"type" : "WEB",
"url" : "https://www.djangoproject.com/weblog/2011/sep/09"
}, {
"type" : "WEB",
"url" : "https://www.djangoproject.com/weblog/2011/sep/10/127"
}, {
"type" : "WEB",
"url" : "http://openwall.com/lists/oss-security/2011/09/11/1"
}, {
"type" : "WEB",
"url" : "http://openwall.com/lists/oss-security/2011/09/13/2"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2011/dsa-2332"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-352" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:39:45Z",
"nvd_published_at" : null
}
}