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
Gentoo Linux
Amazon Linux AMI
Fedora
Ubuntu
python (Alpine package)
python2 (Alpine package)
python3.5 (Debian package)
openSUSE Leap
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
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