NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
HIGH severity

CVE-2012-4520 — django

HIGHFix: django/django@92d3430

CVE-2012-4520 is a high-severity (CVSS 7.5) Improper Input Validation vulnerability in django. A fix is available for django — see the affected versions and patch details below.

Django Allows Arbitrary URL Generation

Also known asGHSA-2655-q453-22f9PYSEC-2012-7
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 12, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
3.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs90th percentile — riskier than 90% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected
🐍django🐍django

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

The django.http.HttpRequest.get_host function in Django 1.3.x before 1.3.4 and 1.4.x before 1.4.2 allows remote attackers to generate and display arbitrary URLs via crafted username and password Host header values.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIdjango≥ 1.3&&< 1.3.41.3.4pip install --upgrade 'django==1.3.4'
🐍PyPIdjango≥ 1.4&&< 1.4.21.4.2pip install --upgrade 'django==1.4.2'

Affected Products

1 product · 8 configurations
Application
djangodjangoproject
6 versions
1.31.3.11.3.21.3.31.41.4.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update django to 1.3.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2012-4520 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

The django.http.HttpRequest.get_host function in Django 1.3.x before 1.3.4 and 1.4.x before 1.4.2 allows remote attackers to generate and display arbitrary URLs via crafted username and password Host header values.
O3 Security · Impact-Aware SCA

Is CVE-2012-4520 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2012-4520: django — Fixed in 1.3.4