Vulnerabilities / CVE-2017-1000158

critical

CVE-2017-1000158

python: Integer overflow in PyString_DecodeEscape results in heap-base buffer overflow

Published Modified CWE 190
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat8.1CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

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

SourcePackageFixed in
Photon OS 1.0python22.7.13-4.ph1
Photon OS 2.0python22.7.13-11.ph2
alpine 3.4python2.7.14-r0
alpine 3.5python22.7.14-r0
alpine 3.6python22.7.14-r0
amazon linux 1python27, python27-debuginfo, python27-devel and 15 more2.7.13-2.122.amzn1 and 2 more
debian 11python2.72.7.13-4
debian 7python2.6, python2.72.6.8-1.1+deb7u1 and 1 more
debian 8python2.7, python3.42.7.9-2+deb8u2 and 1 more
debian 9python2.7, python3.52.7.13-2+deb9u2 and 1 more
Red Hatpython, python-debug, python-devel and 25 moreno fix listed
seal Red Hat 7python, seal-python2.7.5-92.el7_9+sp999
Show all 72 entries from 17 sources
SourcePackageFixed in
Photon OS 1.0python22.7.13-4.ph1
Photon OS 2.0python22.7.13-11.ph2
alpine 3.4python2.7.14-r0
alpine 3.5python22.7.14-r0
alpine 3.6python22.7.14-r0
amazon linux 1python272.7.13-2.122.amzn1
amazon linux 1python27-debuginfo2.7.13-2.122.amzn1
amazon linux 1python27-devel2.7.13-2.122.amzn1
amazon linux 1python27-libs2.7.13-2.122.amzn1
amazon linux 1python27-test2.7.13-2.122.amzn1
amazon linux 1python27-tools2.7.13-2.122.amzn1
amazon linux 1python343.4.7-1.37.amzn1
amazon linux 1python34-debuginfo3.4.7-1.37.amzn1
amazon linux 1python34-devel3.4.7-1.37.amzn1
amazon linux 1python34-libs3.4.7-1.37.amzn1
amazon linux 1python34-test3.4.7-1.37.amzn1
amazon linux 1python34-tools3.4.7-1.37.amzn1
amazon linux 1python353.5.4-13.10.amzn1
amazon linux 1python35-debuginfo3.5.4-13.10.amzn1
amazon linux 1python35-devel3.5.4-13.10.amzn1
amazon linux 1python35-libs3.5.4-13.10.amzn1
amazon linux 1python35-test3.5.4-13.10.amzn1
amazon linux 1python35-tools3.5.4-13.10.amzn1
debian 11python2.72.7.13-4
debian 7python2.62.6.8-1.1+deb7u1
debian 7python2.72.7.3-6+deb7u4
debian 8python2.72.7.9-2+deb8u2
debian 8python3.43.4.2-1+deb8u1
debian 9python2.72.7.13-2+deb9u2
debian 9python3.53.5.3-1+deb9u1
Red Hatpythonno fix listed
Red Hatpython-debugno fix listed
Red Hatpython-develno fix listed
Red Hatpython-libsno fix listed
Red Hatpython-testno fix listed
Red Hatpython-toolsno fix listed
Red Hatpython27-pythonno fix listed
Red Hatpython27-python-debugno fix listed
Red Hatpython27-python-develno fix listed
Red Hatpython27-python-libsno fix listed
Red Hatpython27-python-testno fix listed
Red Hatpython27-python-toolsno fix listed
Red Hatpython27-tkinterno fix listed
Red Hatrh-python34-pythonno fix listed
Red Hatrh-python34-python-debugno fix listed
Red Hatrh-python34-python-develno fix listed
Red Hatrh-python34-python-libsno fix listed
Red Hatrh-python34-python-testno fix listed
Red Hatrh-python34-python-tkinterno fix listed
Red Hatrh-python34-python-toolsno fix listed
Red Hatrh-python35-pythonno fix listed
Red Hatrh-python35-python-debugno fix listed
Red Hatrh-python35-python-develno fix listed
Red Hatrh-python35-python-libsno fix listed
Red Hatrh-python35-python-testno fix listed
Red Hatrh-python35-python-tkinterno fix listed
Red Hatrh-python35-python-toolsno fix listed
Red Hattkinterno fix listed
seal Red Hat 7python2.7.5-92.el7_9+sp999
seal Red Hat 7seal-python2.7.5-92.el7_9+sp999
ubuntu 14.04python2.72.7.6-8ubuntu0.4
ubuntu 14.04python3.43.4.3-1ubuntu1~14.04.6
ubuntu 14.04python3.53.5.2-2ubuntu0~16.04.4~14.04.1
ubuntu 14.04-ESMpython2.72.7.6-8ubuntu0.4
ubuntu 14.04-ESMpython3.43.4.3-1ubuntu1~14.04.6
ubuntu 14.04-ESMpython3.53.5.2-2ubuntu0~16.04.4~14.04.1
ubuntu 16.04python2.72.7.12-1ubuntu0~16.04.2
ubuntu 16.04python3.53.5.2-2ubuntu0~16.04.4
ubuntu 16.04-ESMpython2.72.7.12-1ubuntu0~16.04.2
ubuntu 16.04-ESMpython3.53.5.2-2ubuntu0~16.04.4
ubuntu 17.04python2.72.7.13-2ubuntu0.1
ubuntu 17.04python3.53.5.3-1ubuntu0~17.04.2

References

All 17 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.