CVE-2011-4140 Django Cross-Site Request Forgery vulnerability

Medium 6.8 Published Updated

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.

PackageAffectedFixed in
django PyPIAll versions1.2.7, 1.3.1
django PyPIAll versions to 1.2.7None
django PyPIFrom 1.3 to 1.3.1None
Django PyPIAll versions to 1.2.7None
Django PyPIFrom 1.3 to 1.3.1None

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.

All Djangoproject Django vulnerabilities

Sources

Also known as DEBIAN-CVE-2011-4140, GHSA-h95j-h2rv-qrg4, PYSEC-2011-5.

Is CVE-2011-4140 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free