Skip to content
Noroxi
NVD / CVE Program· CNA mitre

CVE-2017-1000158: CPython (aka Python) up to 2.7.13 is vulnerable to an integer overflow in the PyString_DecodeEscape function in stringobject.c, resulting in…

CriticalCVSS 9.8 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Plan (action score 41/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 7.9% (FIRST EPSS); higher than 94.8% of all records.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
  • According to CISA the attack is automatable: targets can be found by mass scanning.
  • Fixed version: python (Alpine:v3.4) 2.7.14-r0; python2 (Alpine:v3.5) 2.7.14-r0; python2.7 (Debian:11) 2.7.13-4.

Add it to your regular patch cycle. Upgrade to python (Alpine:v3.4) 2.7.14-r0; python2 (Alpine:v3.5) 2.7.14-r0; python2.7 (Debian:11) 2.7.13-4 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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)

Published
Nov 17, 2017
Updated
Oct 8, 2026
EPSS
7.9% · 94th percentile

Report tools

JSON

Action score

41

Plan

Add it to your regular patch cycle.

CVSS
39 / 40 · 9.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
2 / 30 · 7.9%

CISA SSVC decision

Exploitation
none
Automatable
yes
Technical impact
total

Vulnrichment: CISA's decision-tree inputs.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2017-1000158

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
pythonpython
debiandebian linux

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • debian debian linux7.0
  • debian debian linux8.0
  • debian debian linux9.0
  • python pythonbefore 2.7.15
  • python python3.4.0 and later · before 3.4.8
  • python python3.5.0 and later · before 3.5.5

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Alpine:v3.4pythonfrom 3.4.0 · before 2.7.14-r02.7.14-r0
Alpine:v3.5python2before 2.7.14-r02.7.14-r0
Debian:11python2.7before 2.7.13-42.7.13-4
Debian:7python2.6before 2.6.8-1.1+deb7u12.6.8-1.1+deb7u1
Debian:7python2.7before 2.7.3-6+deb7u42.7.3-6+deb7u4
Debian:8python2.7before 2.7.9-2+deb8u22.7.9-2+deb8u2
Debian:8python3.4before 3.4.2-1+deb8u13.4.2-1+deb8u1
Debian:9python3.5before 3.5.3-1+deb9u13.5.3-1+deb9u1
openSUSE:Tumbleweedpythonbefore 2.7.18-8.12.7.18-8.1
SUSE:HPE Helion OpenStack 8python3before 3.4.10-25.39.33.4.10-25.39.3
SUSE:HPE Helion OpenStack 8python3-basebefore 3.4.10-25.39.23.4.10-25.39.2
SUSE:Linux Enterprise Desktop 12 SP3pythonbefore 2.7.13-28.3.22.7.13-28.3.2
SUSE:Linux Enterprise Desktop 12 SP3python-basebefore 2.7.13-28.3.22.7.13-28.3.2
SUSE:Linux Enterprise Server 12 SP3python-docbefore 2.7.13-28.3.32.7.13-28.3.3
SUSE:Linux Enterprise Software Development Kit 11 SP4pythonbefore 2.6.9-40.3.12.6.9-40.3.1
SUSE:Linux Enterprise Software Development Kit 11 SP4python-basebefore 2.6.9-40.3.12.6.9-40.3.1
SUSE:Linux Enterprise Software Development Kit 11 SP4python-docbefore 2.6-8.40.3.12.6-8.40.3.1

Other highest-scoring records for the same primary product.

  • CVE-2016-5636Integer overflow in the get_data function in zipimport.c in CPython (aka Python) before 2.7.12, 3.x before 3.4.5, and 3.5.x before 3.5.2…
    47Plan
  • CVE-2007-4559Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted…
    47Plan
  • CVE-2021-3177Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain…
    46Plan

Published before and after this one in the same product

  • ← EarlierCVE-2016-5699Sep 2, 2016 · CRLF injection vulnerability in the HTTPConnection.putheader function in urllib2 and urllib in CPython (aka Python) before 2.7.10 and 3.x…
    27Monitor
  • ← EarlierCVE-2014-4616Aug 24, 2017 · Array index error in the scanstring function in the _json module in Python 2.7 through 3.5 and simplejson before 2.6.1 allows…
    25Monitor
  • Later →CVE-2017-17522Dec 14, 2017 · Lib/webbrowser.py in Python through 3.6.3 does not validate strings before launching the program specified by the BROWSER environment…
    36Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
alpine:python2.7.14-r0 · Alpine:v3.4Package registry (OSV)
alpine:python22.7.14-r0 · Alpine:v3.5Package registry (OSV)
debian:python2.62.6.8-1.1+deb7u1 · Debian:7Package registry (OSV)
debian:python2.72.7.13-4 · Debian:11Package registry (OSV)
debian:python3.43.4.2-1+deb8u1 · Debian:8Package registry (OSV)
debian:python3.53.5.3-1+deb9u1 · Debian:9Package registry (OSV)
opensuse:python2.7.18-8.1 · openSUSE:TumbleweedPackage registry (OSV)
suse:python2.6.9-40.3.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4Package registry (OSV)
suse:python-base2.6.9-40.3.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4Package registry (OSV)
suse:python-doc2.6-8.40.3.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4Package registry (OSV)
suse:python33.4.10-25.39.3 · SUSE:HPE Helion OpenStack 8Package registry (OSV)
suse:python3-base3.4.10-25.39.2 · SUSE:HPE Helion OpenStack 8Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

ATT&CK techniques

—

References

All records