CVE-2017-1000158
python: Integer overflow in PyString_DecodeEscape results in heap-base buffer overflow
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, Photon OS. Rated lower by Red Hat (medium), Amazon (medium), Ubuntu (medium).
Description
CPython (aka Python) up to 2.7.13 is vulnerable to an integer overflow in the PyString_DecodeEscape function in stringobject.c, resulting in heap-based buffer overflow (and possible arbitrary code execution)
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| Photon OS 1.0 | python2 | 2.7.13-4.ph1 |
| Photon OS 2.0 | python2 | 2.7.13-11.ph2 |
| alpine 3.4 | python | 2.7.14-r0 |
| alpine 3.5 | python2 | 2.7.14-r0 |
| alpine 3.6 | python2 | 2.7.14-r0 |
| amazon linux 1 | python27, python27-debuginfo, python27-devel and 15 more | 2.7.13-2.122.amzn1 and 2 more |
| debian 11 | python2.7 | 2.7.13-4 |
| debian 7 | python2.6, python2.7 | 2.6.8-1.1+deb7u1 and 1 more |
| debian 8 | python2.7, python3.4 | 2.7.9-2+deb8u2 and 1 more |
| debian 9 | python2.7, python3.5 | 2.7.13-2+deb9u2 and 1 more |
| Red Hat | python, python-debug, python-devel and 25 more | no fix listed |
| seal Red Hat 7 | python, seal-python | 2.7.5-92.el7_9+sp999 |
Show all 72 entries from 17 sources
| Source | Package | Fixed in |
|---|---|---|
| Photon OS 1.0 | python2 | 2.7.13-4.ph1 |
| Photon OS 2.0 | python2 | 2.7.13-11.ph2 |
| alpine 3.4 | python | 2.7.14-r0 |
| alpine 3.5 | python2 | 2.7.14-r0 |
| alpine 3.6 | python2 | 2.7.14-r0 |
| amazon linux 1 | python27 | 2.7.13-2.122.amzn1 |
| amazon linux 1 | python27-debuginfo | 2.7.13-2.122.amzn1 |
| amazon linux 1 | python27-devel | 2.7.13-2.122.amzn1 |
| amazon linux 1 | python27-libs | 2.7.13-2.122.amzn1 |
| amazon linux 1 | python27-test | 2.7.13-2.122.amzn1 |
| amazon linux 1 | python27-tools | 2.7.13-2.122.amzn1 |
| amazon linux 1 | python34 | 3.4.7-1.37.amzn1 |
| amazon linux 1 | python34-debuginfo | 3.4.7-1.37.amzn1 |
| amazon linux 1 | python34-devel | 3.4.7-1.37.amzn1 |
| amazon linux 1 | python34-libs | 3.4.7-1.37.amzn1 |
| amazon linux 1 | python34-test | 3.4.7-1.37.amzn1 |
| amazon linux 1 | python34-tools | 3.4.7-1.37.amzn1 |
| amazon linux 1 | python35 | 3.5.4-13.10.amzn1 |
| amazon linux 1 | python35-debuginfo | 3.5.4-13.10.amzn1 |
| amazon linux 1 | python35-devel | 3.5.4-13.10.amzn1 |
| amazon linux 1 | python35-libs | 3.5.4-13.10.amzn1 |
| amazon linux 1 | python35-test | 3.5.4-13.10.amzn1 |
| amazon linux 1 | python35-tools | 3.5.4-13.10.amzn1 |
| debian 11 | python2.7 | 2.7.13-4 |
| debian 7 | python2.6 | 2.6.8-1.1+deb7u1 |
| debian 7 | python2.7 | 2.7.3-6+deb7u4 |
| debian 8 | python2.7 | 2.7.9-2+deb8u2 |
| debian 8 | python3.4 | 3.4.2-1+deb8u1 |
| debian 9 | python2.7 | 2.7.13-2+deb9u2 |
| debian 9 | python3.5 | 3.5.3-1+deb9u1 |
| Red Hat | python | no fix listed |
| Red Hat | python-debug | no fix listed |
| Red Hat | python-devel | no fix listed |
| Red Hat | python-libs | no fix listed |
| Red Hat | python-test | no fix listed |
| Red Hat | python-tools | no fix listed |
| Red Hat | python27-python | no fix listed |
| Red Hat | python27-python-debug | no fix listed |
| Red Hat | python27-python-devel | no fix listed |
| Red Hat | python27-python-libs | no fix listed |
| Red Hat | python27-python-test | no fix listed |
| Red Hat | python27-python-tools | no fix listed |
| Red Hat | python27-tkinter | no fix listed |
| Red Hat | rh-python34-python | no fix listed |
| Red Hat | rh-python34-python-debug | no fix listed |
| Red Hat | rh-python34-python-devel | no fix listed |
| Red Hat | rh-python34-python-libs | no fix listed |
| Red Hat | rh-python34-python-test | no fix listed |
| Red Hat | rh-python34-python-tkinter | no fix listed |
| Red Hat | rh-python34-python-tools | no fix listed |
| Red Hat | rh-python35-python | no fix listed |
| Red Hat | rh-python35-python-debug | no fix listed |
| Red Hat | rh-python35-python-devel | no fix listed |
| Red Hat | rh-python35-python-libs | no fix listed |
| Red Hat | rh-python35-python-test | no fix listed |
| Red Hat | rh-python35-python-tkinter | no fix listed |
| Red Hat | rh-python35-python-tools | no fix listed |
| Red Hat | tkinter | no fix listed |
| seal Red Hat 7 | python | 2.7.5-92.el7_9+sp999 |
| seal Red Hat 7 | seal-python | 2.7.5-92.el7_9+sp999 |
| ubuntu 14.04 | python2.7 | 2.7.6-8ubuntu0.4 |
| ubuntu 14.04 | python3.4 | 3.4.3-1ubuntu1~14.04.6 |
| ubuntu 14.04 | python3.5 | 3.5.2-2ubuntu0~16.04.4~14.04.1 |
| ubuntu 14.04-ESM | python2.7 | 2.7.6-8ubuntu0.4 |
| ubuntu 14.04-ESM | python3.4 | 3.4.3-1ubuntu1~14.04.6 |
| ubuntu 14.04-ESM | python3.5 | 3.5.2-2ubuntu0~16.04.4~14.04.1 |
| ubuntu 16.04 | python2.7 | 2.7.12-1ubuntu0~16.04.2 |
| ubuntu 16.04 | python3.5 | 3.5.2-2ubuntu0~16.04.4 |
| ubuntu 16.04-ESM | python2.7 | 2.7.12-1ubuntu0~16.04.2 |
| ubuntu 16.04-ESM | python3.5 | 3.5.2-2ubuntu0~16.04.4 |
| ubuntu 17.04 | python2.7 | 2.7.13-2ubuntu0.1 |
| ubuntu 17.04 | python3.5 | 3.5.3-1ubuntu0~17.04.2 |
References
- http://python-security.readthedocs.io/vuln/cve-2017-1000158_pystring_decodeescape_integer_overflow.html
- http://www.securitytracker.com/id/1039890
- https://access.redhat.com/security/cve/CVE-2017-1000158
- https://bugs.python.org/issue30657
- https://github.com/python/cpython/commit/c3c9db89273fabc62ea1b48389d9a3000c1c03ae
- https://lists.debian.org/debian-lts-announce/2017/11/msg00035.html
- https://lists.debian.org/debian-lts-announce/2017/11/msg00036.html
- https://lists.debian.org/debian-lts-announce/2018/09/msg00030.html
All 17 references
- https://lists.debian.org/debian-lts-announce/2018/09/msg00031.html
- https://nvd.nist.gov/vuln/detail/CVE-2017-1000158
- https://security.gentoo.org/glsa/201805-02
- https://security.netapp.com/advisory/ntap-20230216-0001/
- https://ubuntu.com/security/notices/USN-3496-1
- https://ubuntu.com/security/notices/USN-3496-2
- https://ubuntu.com/security/notices/USN-3496-3
- https://www.cve.org/CVERecord?id=CVE-2017-1000158
- https://www.debian.org/security/2018/dsa-4307