{"id":"CVE-2017-1000158","title":"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)","summary":"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)","severity":"critical","cvss":9.8,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-190"],"vendor":"python","product":"python","affected":["python < 2.7.15","python >= 3.4.0, < 3.4.8","python >= 3.5.0, < 3.5.5","debian_linux = 7.0","debian_linux = 8.0","debian_linux = 9.0"],"patched":["python 3.5.5"],"published":"2017-11-17","updated":"2026-10-08","sourceUpdated":"2026-10-08T21:17:05.670","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2017-1000158","references":[{"url":"http://www.securitytracker.com/id/1039890","label":"cve@mitre.org"},{"url":"https://bugs.python.org/issue30657","label":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2017/11/msg00035.html","label":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2017/11/msg00036.html","label":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2018/09/msg00030.html","label":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2018/09/msg00031.html","label":"cve@mitre.org"},{"url":"https://security.gentoo.org/glsa/201805-02","label":"cve@mitre.org"},{"url":"https://security.netapp.com/advisory/ntap-20230216-0001/","label":"cve@mitre.org"},{"url":"https://www.debian.org/security/2018/dsa-4307","label":"cve@mitre.org"},{"url":"http://www.securitytracker.com/id/1039890","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.python.org/issue30657","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2017/11/msg00035.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2017/11/msg00036.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2018/09/msg00030.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2018/09/msg00031.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.gentoo.org/glsa/201805-02","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.netapp.com/advisory/ntap-20230216-0001/","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.debian.org/security/2018/dsa-4307","label":"af854a3a-2127-422b-91ae-364da2661108"}],"tags":["nvd"],"epss":0.07944,"epssPercentile":0.94595,"ingestedAt":"2026-10-08T22:11:53.692Z","slug":"CVE-2017-1000158","body":"## Overview\n\nCPython (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)\n\n## Affected\n\n- `python < 2.7.15`\n- `python >= 3.4.0, < 3.4.8`\n- `python >= 3.5.0, < 3.5.5`\n- `debian_linux = 7.0`\n- `debian_linux = 8.0`\n- `debian_linux = 9.0`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `python 3.5.5`","depth":"midnight","depthScore":55,"depthScoreParts":{"impact":53.9,"likelihood":1.6,"exploitation":0,"ransomware":0},"changes":[]}