PyPI: django

CVE-2011-4140

Safety vulnerability ID: SFTY-20111019-91483

Safety legacy ID: pyup.io-33066

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.

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

Django Cross-Site Request Forgery vulnerability

Advisory

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.

Affected Package

Affecting django package, versions<1.2.7>=1.3a1,<1.3.1

Also affects

---

How to Fix

Upgradedjangoto1.2.71.3.1or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more