Skip to content
OpenAdvisories
Critical · 9.8 Public exploit CVE-2014-0472 EUVD-2014-0007GHSA-rvq6-mrpv-m6rmPYSEC-2014-1

Code Injection in Django

Published Apr 23, 2014 · Updated Aug 6, 2024 · Assigned by debian

Description

The django.core.urlresolvers.reverse function in Django before 1.4.11, 1.5.x before 1.5.6, 1.6.x before 1.6.3, and 1.7.x before 1.7 beta 2 allows remote attackers to import and execute arbitrary Python modules by leveraging a view that constructs URLs using user input and a "dotted Python path."

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-django 1.6.3-1 —
Debian 13 python-django 1.6.3-1 —
Debian 12 python-django 1.6.3-1 —
Debian 7 python-django 1.4.5-1+deb7u7 DSA-2934-1
Debian 6.0 python-django 1.2.3-3+squeeze10 DSA-2934-1
ReleasePackageFixed inAdvisory
Ubuntu 14.04 LTS python-django 1.6.1-2ubuntu0.1 USN-2169-1
ReleasePackageFixed inAdvisory
Red Hat OpenStack 4 Django14 +1 1.4.11-1.el6ost RHSA-2014:0456
Red Hat OpenStack 3 Django14 +1 1.4.11-1.el6ost RHSA-2014:0457

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django < 1.4.11 1.4.11 GHSA-rvq6-mrpv-m6rm
PyPI django >= 1.5, < 1.5.6 1.5.6 GHSA-rvq6-mrpv-m6rm
PyPI django >= 1.6, < 1.6.3 1.6.3 GHSA-rvq6-mrpv-m6rm
PyPI django < 1.4.11 · >= 1.5, < 1.5.6 · >= 1.6, < 1.6.3 1.4.11, 1.5.6, 1.6.3 PYSEC-2014-1

Advisories 4

References