{"id":"CVE-2012-4520","aliases":["DEBIAN-CVE-2012-4520","DSA-2634-1","EUVD-2012-0006","GHSA-2655-q453-22f9","PYSEC-2012-7"],"status":"published","title":"Django Allows Arbitrary URL Generation","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.","severity":{"version":"2.0","score":6.4,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.03736,"percentile":0.89912,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2012-11-18T23:00:00Z","modified":"2026-10-23T17:47:27Z","fixes":[{"ecosystem":"PyPI","package":"django","fixed_in":["1.3.4","1.4.2"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"python-django","fixed_in":["1.4.2-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"python-django","fixed_in":["1.4.2-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"python-django","fixed_in":["1.4.2-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.3"},{"fixed":"1.3.4"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.4"},{"fixed":"1.4.2"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"python-django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"python-django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"python-django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-1"}]}]},{"source":"osv","ecosystem":"Debian:6.0","package":"python-django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.3-3+squeeze5"}]}],"versions":["1.2.3-3","1.2.3-3+squeeze1","1.2.3-3+squeeze2","1.2.3-3+squeeze3"],"bundled":4},{"source":"osv","ecosystem":"PyPI","package":"django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.3"},{"fixed":"1.3.4"}]}],"versions":["1.3","1.3.1","1.3.2","1.3.3"]},{"source":"osv","ecosystem":"PyPI","package":"django","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.4"},{"fixed":"1.4.2"}]}],"versions":["1.4","1.4.1"]},{"source":"osv","ecosystem":"PyPI","package":"django","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"9305c0e12d43c4df999c3301a1f0c742264a657e"},{"fixed":"b45c377f8f488955e0c7069cad3f3dd21910b071"},{"fixed":"92d3430f12171f16f566c9050c40feefb830a4a3"}]},{"type":"ECOSYSTEM","events":[{"introduced":"1.3"},{"fixed":"1.3.4"},{"introduced":"1.4"},{"fixed":"1.4.2"}]}],"versions":["1.3","1.3.1","1.3.2","1.3.3","1.4","1.4.1","1.2.1","1.2","1.1","1.0"]}],"products":[{"vendor":"djangoproject","product":"django"}],"references":[{"url":"http://www.openwall.com/lists/oss-security/2012/10/30/4","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"http://securitytracker.com/id?1027708","tags":["vdb-entry","x_refsource_SECTRACK","x_transferred","web"]},{"url":"https://github.com/django/django/commit/b45c377f8f488955e0c7069cad3f3dd21910b071","tags":["x_refsource_CONFIRM","x_transferred","fix","web"]},{"url":"http://www.osvdb.org/86493","tags":["vdb-entry","x_refsource_OSVDB","x_transferred","web"]},{"url":"http://secunia.com/advisories/51314","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Vendor Advisory","advisory"]},{"url":"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090970.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"http://ubuntu.com/usn/usn-1757-1","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred","web"]},{"url":"https://github.com/django/django/commit/92d3430f12171f16f566c9050c40feefb830a4a3","tags":["x_refsource_CONFIRM","x_transferred","fix","web"]},{"url":"http://www.debian.org/security/2013/dsa-2634","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","advisory","web"]},{"url":"https://www.djangoproject.com/weblog/2012/oct/17/security/","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory","advisory","fix","article"]},{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090904.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://github.com/django/django/commit/9305c0e12d43c4df999c3301a1f0c742264a657e","tags":["x_refsource_CONFIRM","x_transferred","fix","web"]},{"url":"http://secunia.com/advisories/51033","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Vendor Advisory","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=865164","tags":["x_refsource_MISC","x_transferred","report","web"]},{"url":"http://lists.fedoraproject.org/pipermail/package-announce/2012-October/090666.html","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"http://ubuntu.com/usn/usn-1632-1","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2012-4520","tags":["advisory"]},{"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691145","tags":["web"]},{"url":"https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090666.html","tags":["web"]},{"url":"https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090904.html","tags":["web"]},{"url":"https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090970.html","tags":["web"]},{"url":"https://ubuntu.com/usn/usn-1632-1","tags":["web"]},{"url":"https://ubuntu.com/usn/usn-1757-1","tags":["web"]},{"url":"https://web.archive.org/web/20140417023920/http://securitytracker.com/id?1027708","tags":["web"]},{"url":"https://www.debian.org/security/2013/dsa-2634","tags":["web"]},{"url":"https://www.openwall.com/lists/oss-security/2012/10/30/4","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2012-7.yaml","tags":["web"]},{"url":"https://www.djangoproject.com/weblog/2012/oct/17/security","tags":["web"]},{"url":"https://github.com/advisories/GHSA-2655-q453-22f9","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2012-4520","tags":["advisory"]},{"url":"https://github.com/django/django","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2012-4520","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.","status":"published","published":"2012-11-18T23:00:00Z","modified":"2024-08-06T20:42:53.672Z","updated_at":"2026-11-02T14:34:51.584538Z"}],"euvd":[{"id":"EUVD-2012-0006","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.","status":"published","published":"2012-11-18T23:00:00Z","modified":"2024-08-06T20:42:53Z","updated_at":"2026-11-03T01:56:07.373412Z"}],"ghsa":[{"id":"GHSA-2655-q453-22f9","title":"Django Allows Arbitrary URL Generation","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.","status":"published","published":"2022-05-17T05:10:31Z","modified":"2024-09-18T18:56:02Z","cvss":[{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:38:03.800952Z"}],"nvd":[{"id":"CVE-2012-4520","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.","status":"published","published":"2012-11-18T23:55:01.04Z","modified":"2026-06-16T23:45:15.11Z","cvss":[{"version":"2.0","score":6.4,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:02:16.536025Z"}],"osv":[{"id":"GHSA-2655-q453-22f9","title":"Django Allows Arbitrary URL Generation","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.","status":"published","published":"2022-05-17T05:10:31Z","modified":"2024-09-18T19:08:46.313528Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"},{"version":"4.0","score":8.7,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:33.956911Z"},{"id":"CVE-2012-4520","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.","status":"published","published":"2012-11-18T23:55:01Z","modified":"2026-04-10T03:42:28.861223Z","updated_at":"2026-11-02T15:43:58.802805Z"},{"id":"DEBIAN-CVE-2012-4520","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.","status":"published","published":"2012-11-18T23:55:01.04Z","modified":"2026-10-23T17:47:27.044140316Z","updated_at":"2026-11-02T15:45:25.218101Z"},{"id":"DSA-2634-1","title":"python-django - several vulnerabilities","status":"published","published":"2013-02-27T00:00:00Z","modified":"2026-03-09T01:23:11.805627Z","updated_at":"2026-11-02T15:46:15.489951Z"},{"id":"PYSEC-2012-7","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.","status":"published","published":"2012-11-18T23:55:00Z","modified":"2026-06-10T17:00:53.800785285Z","updated_at":"2026-11-02T15:52:51.645172Z"}]}}
