Integer overflow in Python - CVE-2017-1000158

 

Integer overflow in Python - CVE-2017-1000158

Published: November 28, 2017 / Updated: December 4, 2017


Vulnerability identifier: #VU9432
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2017-1000158
CWE-ID: CWE-190
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The weakness exists due to an integer overflow in the PyString_DecodeEscape function in stringobject.c. A remote attacker can trigger heap-based buffer overflow and execute arbitrary code with elevated privileges.

Successful exploitation of the vulnerability may result in system compromise.

Affected software

Python
Amazon Linux AMI
Gentoo Linux
Fedora
Debian Linux
Ubuntu
python (Alpine package)
python2 (Alpine package)
openSUSE Leap
python2.6 (Debian package)
python2.7-minimal (Ubuntu package)
python2.7 (Ubuntu package)
python2.7 (Debian package)
python3.4 (Debian package)
python3.5 (Debian package)
python26
python
python33
python34
python35
python3

How to mitigate CVE-2017-1000158

Install update from vendor's website.

python (Alpine package) - update to 2.7.14-r0
python2 (Alpine package) - update to 2.7.14-r0
python2.6 (Debian package) - update to 2.6.8-1.1+deb7u1
python2.7-minimal (Ubuntu package) - update to 2.7.3-0ubuntu3.10
python2.7 (Ubuntu package) - update to 2.7.3-0ubuntu3.10
python2.7 (Debian package) - addressed in versions 2.7.3-6+deb7u4, 2.7.9-2+deb8u2
python3.4 (Debian package) - update to 3.4.2-1+deb8u1
python3.5 (Debian package) - update to 3.5.3-1+deb9u1
python26 - addressed in versions 2.6.9-7.fc26, 2.6.9-10.fc27
python - update to 2.7.13-3.fc25
python33 - addressed in versions 3.3.7-2.fc26, 3.3.7-2.fc27
python34 - addressed in versions 3.4.5-4.el6, 3.4.5-5.el7, 3.4.7-2.fc26, 3.4.7-2.fc27
python35 - addressed in versions 3.5.4-2.fc26, 3.5.4-2.fc27
python3 - update to 3.5.4-3.fc25

External References

Related Security Bulletins