Resource management error in Python - CVE-2011-1521

 

Resource management error in Python - CVE-2011-1521

Published: May 25, 2011 / Updated: August 11, 2020


Vulnerability identifier: #VU45029
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2011-1521
CWE-ID: CWE-399
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to #BASIC_IMPACT#.

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 software

Python
Ubuntu
python2.4-minimal (Ubuntu package)
python2.4 (Ubuntu package)
python2.5 (Ubuntu package)
python2.5-minimal (Ubuntu package)
python2.6 (Ubuntu package)
python2.6-minimal (Ubuntu package)
python2.7-minimal (Ubuntu package)
python2.7 (Ubuntu package)
python3.1-minimal (Ubuntu package)
python3.2-minimal (Ubuntu package)

How to mitigate CVE-2011-1521

Install update from vendor's website.

python2.4-minimal (Ubuntu package) - update to 2.4.5-1ubuntu4.4
python2.4 (Ubuntu package) - update to 2.4.5-1ubuntu4.4
python2.5 (Ubuntu package) - update to 2.5.2-2ubuntu6.2
python2.5-minimal (Ubuntu package) - update to 2.5.2-2ubuntu6.2
python2.6 (Ubuntu package) - addressed in versions 2.6.5-1ubuntu6.1, 2.6.6-6ubuntu7.1, 2.6.7-4ubuntu1.1
python2.6-minimal (Ubuntu package) - addressed in versions 2.6.5-1ubuntu6.1, 2.6.6-6ubuntu7.1, 2.6.7-4ubuntu1.1
python2.7-minimal (Ubuntu package) - addressed in versions 2.7.1-5ubuntu2.2, 2.7.2-5ubuntu1.1
python2.7 (Ubuntu package) - addressed in versions 2.7.1-5ubuntu2.2, 2.7.2-5ubuntu1.1
python3.1-minimal (Ubuntu package) - addressed in versions 3.1.2-0ubuntu3.1, 3.1.2+20100915-0ubuntu4.1, 3.1.3-1ubuntu1.1
python3.2-minimal (Ubuntu package) - update to 3.2-1ubuntu1.1

External References

Related Security Bulletins