Every CVE Search/ Get API key

CVE-2017-1000158

CPython (aka Python) up to 2.7.13 is vulnerable to an integer overflow in the...

9.8 CriticalFix available

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)

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

7.94%Up 4.7 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

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)

Record
CVE-2017-1000158
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-190
Updated
2026-11-02
CVE List No score

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)

Record
CVE-2017-1000158
Updated
2026-11-02
EUVDEUVD-2017-1443 No score

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)

Record
EUVD-2017-1443
Updated
2026-11-02
GitHub AdvisoriesGHSA-r68f-4xcm-3xr6 9.8

CPython (aka Python) up to 2.7.13 is vulnerable to an integer overflow in the...

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)

Record
GHSA-r68f-4xcm-3xr6
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVALPINE-CVE-2017-1000158 9.8

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)

Record
ALPINE-CVE-2017-1000158
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVAZL-109614 9.8

CVE-2017-1000158 affecting package python-py 1.11.0-1

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)

Record
AZL-109614
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 14 moreShow less
OSV 9.8

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)

Record
CVE-2017-1000158
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2017-1000158 9.8

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)

Record
DEBIAN-CVE-2017-1000158
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2017-1000158 9.8

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)

Record
UBUNTU-CVE-2017-1000158
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVCLSA-2026-1777585788 No score

python: Fix of CVE-2017-1000158

  • CVE-2017-1000158: fix integer overflow in PyString_DecodeEscape that could trigger a heap-based buffer overflow when decoding very large byte strings
Record
CLSA-2026-1777585788
Updated
2026-11-02
OSVCLSA-2026-1777586657 No score

python: Fix of CVE-2017-1000158

  • CVE-2017-1000158: fix integer overflow in PyString_DecodeEscape that could trigger a heap-based buffer overflow when decoding very large byte strings
Record
CLSA-2026-1777586657
Updated
2026-11-02
OSVMGASA-2018-0004 No score

Updated python/python3 packages fix security vulnerability

It was discovered that Python incorrectly handled decoding certain strings. An attacker could possibly use this issue to execute arbitrary code (CVE-2017-1000158).

Record
MGASA-2018-0004
Updated
2026-11-02
OSVopenSUSE-SU-2024:11202-1 No score

python-2.7.18-8.1 on GA media

These are all security issues fixed in the python-2.7.18-8.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11202-1
Updated
2026-11-02
OSVPSF-2017-6 No score

PyString_DecodeEscape integer overflow

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)

Record
PSF-2017-6
Updated
2026-11-02
OSVSUSE-SU-2018:0768-1 No score

Security update for python

This update for python fixes the following issues:

  • CVE-2017-1000158: Fixed integer overflow in thePyString_DecodeEscape function (bsc#1068664).
Record
SUSE-SU-2018:0768-1
Updated
2026-11-02
OSVSUSE-SU-2018:1372-1 No score

Security update for python

This update for python fixes the following issues:

Security issues fixed:

  • CVE-2017-1000158: Fixed integer overflows in PyString_DecodeEscape that could have resulted in heap-based buffer overflow attacks and possible arbitrary code execution (bsc#1068664).
  • CVE-2018-1000030: Fixed crash inside the Python interpreter when multiple threads used the same I/O stream concurrently (bsc#1079300).
Record
SUSE-SU-2018:1372-1
Updated
2026-11-02
OSVSUSE-SU-2020:0234-1 No score

Security update for python

This update for python fixes the following issues:

Updated to version 2.7.17 to unify packages among openSUSE:Factory and SLE versions (bsc#1159035).

Record
SUSE-SU-2020:0234-1
Updated
2026-11-02
OSVSUSE-SU-2020:0497-1 No score

Security update for python3

This update for python3 fixes the following issues:

Update to 3.4.10 (jsc#SLE-9427, bsc#1159208) from 3.4.6:

Security issues fixed:

  • Update expat copy from 2.1.1 to 2.2.0 to fix the following issues: CVE-2012-0876, CVE-2016-0718, CVE-2016-4472, CVE-2017-9233, CVE-2016-9063
  • CVE-2017-1000158: Fix an integer overflow in thePyString_DecodeEscape function in stringobject.c, resulting in heap-based bufferoverflow (bsc#1068664).
Record
SUSE-SU-2020:0497-1
Updated
2026-11-02
OSVUSN-3496-1 No score

python2.7 vulnerability

It was discovered that Python incorrectly handled decoding certain strings. An attacker could possibly use this issue to execute arbitrary code.

Record
USN-3496-1
Updated
2026-11-02
OSVUSN-3496-3 No score

python3.4, python3.5 vulnerability

USN-3496-1 fixed a vulnerability in Python2.7. This update provides the corresponding update for versions 3.4 and 3.5.

Original advisory details:

It was discovered that Python incorrectly handled decoding certain strings. An attacker could possibly use this issue to execute arbitrary code.

Record
USN-3496-3
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
python
Alpine:v3.4
3.4.0 up to 2.7.14-r0
2.7.14-r0
python2
Alpine:v3.5
before 2.7.14-r0
2.7.14-r0
python2
Alpine:v3.6
before 2.7.14-r0
2.7.14-r0
python-py
Azure Linux:3
through 1.11.0-1 None known
python
TuxCare:OracleLinux:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-devel
TuxCare:OracleLinux:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-libs
TuxCare:OracleLinux:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-test
TuxCare:OracleLinux:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-tools
TuxCare:OracleLinux:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
tkinter
TuxCare:OracleLinux:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
Show 92 moreShow less
Affected packages
PackageAffectedFixed
python
TuxCare:CentOS:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-devel
TuxCare:CentOS:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-libs
TuxCare:CentOS:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-test
TuxCare:CentOS:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python-tools
TuxCare:CentOS:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
tkinter
TuxCare:CentOS:6
before 2.6.6-70.el6.tuxcare.els21
2.6.6-70.el6.tuxcare.els21
python2.7
Debian:11
before 2.7.13-4
2.7.13-4
python2.7
Debian:7
before 2.7.3-6+deb7u4, plus listed versions
2.7.3-62.7.3-6+deb7u12.7.3-6+deb7u22.7.3-6+deb7u3
2.7.3-6+deb7u4
python2.6
Debian:7
before 2.6.8-1.1+deb7u1, plus listed versions
2.6.8-1.1
2.6.8-1.1+deb7u1
python2.7
Debian:8
before 2.7.9-2+deb8u2, plus listed versions
2.7.9-22.7.9-2+deb8u1
2.7.9-2+deb8u2
python3.4
Debian:8
before 3.4.2-1+deb8u1, plus listed versions
3.4.2-1
3.4.2-1+deb8u1
python3.5
Debian:9
before 3.5.3-1+deb9u1, plus listed versions
3.5.3-1
3.5.3-1+deb9u1
python
Mageia:5
before 2.7.9-2.5.mga5
2.7.9-2.5.mga5
python3
Mageia:5
before 3.4.3-1.6.mga5
3.4.3-1.6.mga5
python
Mageia:6
before 2.7.13-1.1.mga6
2.7.13-1.1.mga6
python3
Mageia:6
before 3.5.3-1.1.mga6
3.5.3-1.1.mga6
python
SUSE:Linux Enterprise Software Development Kit 11 SP4
before 2.6.9-40.3.1
2.6.9-40.3.1
python-base
SUSE:Linux Enterprise Software Development Kit 11 SP4
before 2.6.9-40.3.1
2.6.9-40.3.1
python-doc
SUSE:Linux Enterprise Software Development Kit 11 SP4
before 2.6-8.40.3.1
2.6-8.40.3.1
python
SUSE:Linux Enterprise Server 11 SP4
before 2.6.9-40.3.1
2.6.9-40.3.1
python-base
SUSE:Linux Enterprise Server 11 SP4
before 2.6.9-40.3.1
2.6.9-40.3.1
python-doc
SUSE:Linux Enterprise Server 11 SP4
before 2.6-8.40.3.1
2.6-8.40.3.1
python
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
before 2.6.9-40.3.1
2.6.9-40.3.1
python-base
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
before 2.6.9-40.3.1
2.6.9-40.3.1
python-doc
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
before 2.6-8.40.3.1
2.6-8.40.3.1
python
SUSE:Linux Enterprise Desktop 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python-base
SUSE:Linux Enterprise Desktop 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python-base
SUSE:Linux Enterprise Software Development Kit 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python
SUSE:Linux Enterprise Server 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python-base
SUSE:Linux Enterprise Server 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python-doc
SUSE:Linux Enterprise Server 12 SP3
before 2.7.13-28.3.3
2.7.13-28.3.3
python
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python-base
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python-doc
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 2.7.13-28.3.3
2.7.13-28.3.3
python-base
SUSE:Linux Enterprise Workstation Extension 12 SP3
before 2.7.13-28.3.2
2.7.13-28.3.2
python
SUSE:Enterprise Storage 5
before 2.7.13-28.3.2
2.7.13-28.3.2
python
SUSE:Linux Enterprise Module for Basesystem 15
before 2.7.17-7.32.2
2.7.17-7.32.2
python-base
SUSE:Linux Enterprise Module for Basesystem 15
before 2.7.17-7.32.1
2.7.17-7.32.1
python
SUSE:Linux Enterprise Module for Basesystem 15 SP1
before 2.7.17-7.32.2
2.7.17-7.32.2
python-base
SUSE:Linux Enterprise Module for Basesystem 15 SP1
before 2.7.17-7.32.1
2.7.17-7.32.1
python
SUSE:Linux Enterprise Module for Desktop Applications 15
before 2.7.17-7.32.2
2.7.17-7.32.2
python
SUSE:Linux Enterprise Module for Desktop Applications 15 SP1
before 2.7.17-7.32.2
2.7.17-7.32.2
python
SUSE:Linux Enterprise Module for Python 2 15 SP1
before 2.7.17-7.32.2
2.7.17-7.32.2
python-base
SUSE:Linux Enterprise Module for Python 2 15 SP1
before 2.7.17-7.32.1
2.7.17-7.32.1
python3
SUSE:HPE Helion OpenStack 8
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:HPE Helion OpenStack 8
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:OpenStack Cloud 7
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:OpenStack Cloud 7
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:OpenStack Cloud 8
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:OpenStack Cloud 8
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:OpenStack Cloud Crowbar 8
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:OpenStack Cloud Crowbar 8
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Desktop 12 SP4
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Desktop 12 SP4
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Module for Web and Scripting 12
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Module for Web and Scripting 12
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server for SAP Applications 12 SP1
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server for SAP Applications 12 SP1
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Software Development Kit 12 SP4
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Software Development Kit 12 SP4
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Software Development Kit 12 SP5
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Software Development Kit 12 SP5
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP1-LTSS
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP1-LTSS
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP2-LTSS
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP2-LTSS
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP2-BCL
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP2-BCL
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP3-LTSS
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP3-LTSS
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP3-BCL
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP3-BCL
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP4
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP4
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server 12 SP5
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server 12 SP5
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 3.4.10-25.39.2
3.4.10-25.39.2
python3
SUSE:Enterprise Storage 5
before 3.4.10-25.39.3
3.4.10-25.39.3
python3-base
SUSE:Enterprise Storage 5
before 3.4.10-25.39.2
3.4.10-25.39.2
python2.7
Ubuntu:14.04:LTS
before 2.7.6-8ubuntu0.4, plus listed versions
2.7.5-8ubuntu32.7.5-8ubuntu42.7.6-22.7.6-2ubuntu12.7.6-3
Show 8 moreShow less
2.7.6-3ubuntu12.7.6-42.7.6-4ubuntu12.7.6-52.7.6-72.7.6-82.7.6-8ubuntu0.22.7.6-8ubuntu0.3
2.7.6-8ubuntu0.4
python3.4
Ubuntu:14.04:LTS
before 3.4.3-1ubuntu1~14.04.6, plus listed versions
3.4~b1-0ubuntu33.4~b1-4ubuntu43.4~b1-4ubuntu63.4~b1-5ubuntu23.4~b2-1
Show 11 moreShow less
3.4~b3-1ubuntu13.4~rc1-1build13.4~rc2-13.4~rc3-0ubuntu13.4.0-13.4.0-2ubuntu13.4.0-2ubuntu1.13.4.3-1ubuntu1~14.04.13.4.3-1ubuntu1~14.04.33.4.3-1ubuntu1~14.04.43.4.3-1ubuntu1~14.04.5
3.4.3-1ubuntu1~14.04.6
python3.5
Ubuntu:14.04:LTS
before 3.5.2-2ubuntu0~16.04.4~14.04.1
3.5.2-2ubuntu0~16.04.4~14.04.1
python2.7
Ubuntu:16.04:LTS
before 2.7.12-1ubuntu0~16.04.2, plus listed versions
2.7.10-4ubuntu12.7.10-4ubuntu22.7.11-22.7.11-32.7.11-4
Show 5 moreShow less
2.7.11-62.7.11-72.7.11-7ubuntu12.7.12-1~16.042.7.12-1ubuntu0~16.04.1
2.7.12-1ubuntu0~16.04.2
python3.5
Ubuntu:16.04:LTS
before 3.5.2-2ubuntu0~16.04.4, plus listed versions
3.5.0-33.5.0-3ubuntu13.5.1~rc1-2ubuntu13.5.1-13.5.1-2
Show 11 moreShow less
3.5.1-33.5.1-53.5.1-6ubuntu13.5.1-6ubuntu23.5.1-9ubuntu13.5.1-103.5.2-2~16.013.5.2-2~16.043.5.2-2ubuntu0~16.04.13.5.2-2ubuntu0~16.04.23.5.2-2ubuntu0~16.04.3
3.5.2-2ubuntu0~16.04.4
python
openSUSE:Tumbleweed
before 2.7.18-8.1
2.7.18-8.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2017-1000158 is a critical vulnerability (CVSS 9.8) in Python, published November 17, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 7.94%, the 94th percentile. Fixed in python 2.7.14-r0.

References

Show 161 moreShow less
MoveEnter Open