Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Django
  4. ›
  5. CVE-2012-4520

CVE-2012-4520: Django Allows Arbitrary URL Generation

May 17, 2022 (updated September 18, 2024)

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.

References

  • bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145
  • bugzilla.redhat.com/show_bug.cgi?id=865164
  • github.com/advisories/GHSA-2655-q453-22f9
  • github.com/django/django
  • github.com/django/django/commit/92d3430f12171f16f566c9050c40feefb830a4a3
  • github.com/django/django/commit/9305c0e12d43c4df999c3301a1f0c742264a657e
  • github.com/django/django/commit/b45c377f8f488955e0c7069cad3f3dd21910b071
  • github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2012-7.yaml
  • lists.fedoraproject.org/pipermail/package-announce/2012-October/090666.html
  • lists.fedoraproject.org/pipermail/package-announce/2012-October/090904.html
  • lists.fedoraproject.org/pipermail/package-announce/2012-October/090970.html
  • nvd.nist.gov/vuln/detail/CVE-2012-4520
  • ubuntu.com/usn/usn-1632-1
  • ubuntu.com/usn/usn-1757-1
  • web.archive.org/web/20140417023920/http://securitytracker.com/id?1027708
  • www.debian.org/security/2013/dsa-2634
  • www.djangoproject.com/weblog/2012/oct/17/security
  • www.openwall.com/lists/oss-security/2012/10/30/4

Code Behaviors & Features

Detect and mitigate CVE-2012-4520 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.3 before 1.3.4, all versions starting from 1.4 before 1.4.2

Fixed versions

  • 1.3.4
  • 1.4.2

Solution

Upgrade to versions 1.3.4, 1.4.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation

Source file

pypi/Django/CVE-2012-4520.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:07 +0000.