Vulnerabilities · 2011 · Python
CVE-2011-1521
Python vulnerability
The urllib and urllib2 modules in Python 2.x before 2.7.2 and 3.x before 3.2.1 process Location headers that specify redirection to file: URLs, which makes it easier for remote attackers to obtain sensitive information or cause a denial of service (resource consumption) via a crafted URL, as demonstrated by the file:///etc/passwd and file:///dev/zero URLs.
Affected products
Python. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Python runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- bugs.python.org/issue11662 · Patch
- hg.python.org/cpython/rev/96a6c128822b/ · Patch
- hg.python.org/cpython/rev/b2934d98dac1/ · Patch
- bugzilla.redhat.com/show_bug.cgi?id=690560 · Patch
- hg.python.org/cpython/file/96a6c128822b/Misc/NEWS
- hg.python.org/cpython/file/b2934d98dac1/Misc/NEWS
- lists.apple.com/archives/Security-announce/2011//Oct/msg00003.html
- lists.opensuse.org/opensuse-security-announce/2011-05/msg00005.html
- nvd.nist.gov/vuln/detail/CVE-2011-1521
- cve.org/CVERecord?id=CVE-2011-1521
More vulnerabilities in Python products
CVE-2026-21441CVE-2025-66471CVE-2025-66418CVE-2025-50182CVE-2025-50181CVE-2025-48379CVE-2025-47273CVE-2025-13837All 231
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.