CVE-2011-4140 Django Cross-Site Request Forgery vulnerability
Remote attackers can bypass CSRF protection in Django via DNS CNAME tricks and JavaScript, triggering forged requests from victims.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2011-4140?
CVE-2011-4140 is a medium-severity vulnerability in Djangoproject Django, published on 19 Oct 2011. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-352
Which versions are affected by CVE-2011-4140?
5 open source packages ship an affected version, including django and Django. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
django PyPI | All versions | 1.2.7, 1.3.1 |
django PyPI | All versions to 1.2.7 | None |
django PyPI | From 1.3 to 1.3.1 | None |
Django PyPI | All versions to 1.2.7 | None |
Django PyPI | From 1.3 to 1.3.1 | None |
Products include Djangoproject Django.
How do I fix CVE-2011-4140?
Upgrade django to a fixed version for your release line: 1.2.7 or 1.3.1.
Is CVE-2011-4140 being exploited?
There is no known exploitation of CVE-2011-4140 in the wild and no public exploit code.
Other vulnerabilities in Djangoproject Django
- CVE-2026-4277 Privilege abuse in GenericInlineModelAdmin
- CVE-2024-53908 Django SQL injection in HasKey(lhs, rhs) on Oracle
- CVE-2024-42005 Django SQL injection vulnerability
- CVE-2023-31047 Django bypasses validation when using one form field to upload multiple files
- CVE-2022-34265 Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection
Sources
Also known as DEBIAN-CVE-2011-4140, GHSA-h95j-h2rv-qrg4, PYSEC-2011-5.