Cloudanix VulnDB

CVE-2017-1000158

Critical · 9.8

CVSS

9.8

EPSS

7.9%

Published

Nov 17, 2017

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

Older versions of Python contain a flaw that lets attackers run their own code on affected systems if they can send specially crafted data, so organizations should update Python to stay protected.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Library
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Integer overflow in PyString_DecodeEscape causes heap-based buffer overflow enabling potential arbitrary code execution in vulnerable CPython interpreters.

Why it matters to the business

Unpatched Python environments risk remote code execution that can lead to data theft, service disruption, or full system takeover across applications and dependent services.

How an attack unfolds

An attacker supplies a maliciously crafted string to any code path invoking PyString_DecodeEscape; the integer overflow miscalculates buffer size, resulting in a heap overflow that an attacker can leverage to overwrite memory structures and execute arbitrary code.

How to fix it

Upgrade python/cpython to commit ca079a3ea30098aff3197c559a0e32d42dda6d84 or later; upgrade policy-controller-fips and policy-controller-tester-fips to 0.8.4-r2 or later. Remove or isolate any remaining instances of Python 2.7.13 or earlier.

How to confirm the fix worked

Confirm installed Python versions exceed 2.7.13, run regression tests with known overflow-triggering inputs against PyString_DecodeEscape, and verify no vulnerable binaries remain in runtime paths.

Typical attack path

  1. Locate an exposed Python application or service that processes attacker-controlled input through string decoding routines
  2. Transmit a specially formed string designed to trigger the overflow in PyString_DecodeEscape
  3. Manipulate heap layout to achieve code execution and establish persistence or exfiltrate data

How to detect it

Search process execution logs and application telemetry for crashes or segmentation faults occurring during string decode operations; correlate with any services still running Python versions prior to the listed fixes.

What your security team should do

  • Immediately inventory all Python 2.7.x deployments and schedule upgrades to fixed versions
  • Block or sandbox services that still rely on unpatched Python interpreters until remediation completes
  • Add version checks for Python runtimes to continuous compliance scanning

The record

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

Ecosystem Package Introduced Fixed
Alpine:v3.4 python 0 2.7.14-r0
Alpine:v3.5 python2 0 2.7.14-r0
Alpine:v3.6 python2 0 2.7.14-r0
Debian:11 python2.7 0 2.7.13-4
Debian:7 python2.6 0 2.6.8-1.1+deb7u1
Debian:7 python2.7 0 2.7.3-6+deb7u4
Debian:8 python2.7 0 2.7.9-2+deb8u2
Debian:8 python3.4 0 3.4.2-1+deb8u1
Debian:9 python3.5 0 3.5.3-1+deb9u1
Mageia:5 python 0 2.7.9-2.5.mga5
Mageia:5 python3 0 3.4.3-1.6.mga5
Mageia:6 python 0 2.7.13-1.1.mga6
Mageia:6 python3 0 3.5.3-1.1.mga6
SUSE:Enterprise Storage 5 python 0 2.7.13-28.3.2
SUSE:Enterprise Storage 5 python3 0 3.4.10-25.39.3
SUSE:Enterprise Storage 5 python3-base 0 3.4.10-25.39.2
SUSE:HPE Helion OpenStack 8 python3 0 3.4.10-25.39.3
SUSE:HPE Helion OpenStack 8 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Desktop 12 SP3 python 0 2.7.13-28.3.2
SUSE:Linux Enterprise Desktop 12 SP3 python-base 0 2.7.13-28.3.2
SUSE:Linux Enterprise Desktop 12 SP4 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Desktop 12 SP4 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Module for Basesystem 15 python 0 2.7.17-7.32.2
SUSE:Linux Enterprise Module for Basesystem 15 python-base 0 2.7.17-7.32.1
SUSE:Linux Enterprise Module for Basesystem 15 SP1 python 0 2.7.17-7.32.2
SUSE:Linux Enterprise Module for Basesystem 15 SP1 python-base 0 2.7.17-7.32.1
SUSE:Linux Enterprise Module for Desktop Applications 15 python 0 2.7.17-7.32.2
SUSE:Linux Enterprise Module for Desktop Applications 15 SP1 python 0 2.7.17-7.32.2
SUSE:Linux Enterprise Module for Python 2 15 SP1 python 0 2.7.17-7.32.2
SUSE:Linux Enterprise Module for Python 2 15 SP1 python-base 0 2.7.17-7.32.1
SUSE:Linux Enterprise Module for Web and Scripting 12 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Module for Web and Scripting 12 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 11 SP4 python 0 2.6.9-40.3.1
SUSE:Linux Enterprise Server 11 SP4 python-base 0 2.6.9-40.3.1
SUSE:Linux Enterprise Server 11 SP4 python-doc 0 2.6-8.40.3.1
SUSE:Linux Enterprise Server 12 SP1-LTSS python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP1-LTSS python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 12 SP2-BCL python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP2-BCL python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 12 SP2-LTSS python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP2-LTSS python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 12 SP3 python 0 2.7.13-28.3.2
SUSE:Linux Enterprise Server 12 SP3 python-base 0 2.7.13-28.3.2
SUSE:Linux Enterprise Server 12 SP3 python-doc 0 2.7.13-28.3.3
SUSE:Linux Enterprise Server 12 SP3-BCL python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP3-BCL python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 12 SP3-LTSS python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP3-LTSS python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 12 SP4 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP4 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server 12 SP5 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server 12 SP5 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 python 0 2.6.9-40.3.1
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 python-base 0 2.6.9-40.3.1
SUSE:Linux Enterprise Server for SAP Applications 11 SP4 python-doc 0 2.6-8.40.3.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 python 0 2.7.13-28.3.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 python-base 0 2.7.13-28.3.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 python-doc 0 2.7.13-28.3.3
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Software Development Kit 11 SP4 python 0 2.6.9-40.3.1
SUSE:Linux Enterprise Software Development Kit 11 SP4 python-base 0 2.6.9-40.3.1
SUSE:Linux Enterprise Software Development Kit 11 SP4 python-doc 0 2.6-8.40.3.1
SUSE:Linux Enterprise Software Development Kit 12 SP3 python-base 0 2.7.13-28.3.2
SUSE:Linux Enterprise Software Development Kit 12 SP4 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Software Development Kit 12 SP4 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Software Development Kit 12 SP5 python3 0 3.4.10-25.39.3
SUSE:Linux Enterprise Software Development Kit 12 SP5 python3-base 0 3.4.10-25.39.2
SUSE:Linux Enterprise Workstation Extension 12 SP3 python-base 0 2.7.13-28.3.2
SUSE:OpenStack Cloud 7 python3 0 3.4.10-25.39.3
SUSE:OpenStack Cloud 7 python3-base 0 3.4.10-25.39.2
SUSE:OpenStack Cloud 8 python3 0 3.4.10-25.39.3
SUSE:OpenStack Cloud 8 python3-base 0 3.4.10-25.39.2
SUSE:OpenStack Cloud Crowbar 8 python3 0 3.4.10-25.39.3
SUSE:OpenStack Cloud Crowbar 8 python3-base 0 3.4.10-25.39.2
Ubuntu:14.04:LTS python2.7 0 2.7.6-8ubuntu0.4
Ubuntu:14.04:LTS python3.4 0 3.4.3-1ubuntu1~14.04.6
Ubuntu:14.04:LTS python3.5 0 3.5.2-2ubuntu0~16.04.4~14.04.1
Ubuntu:16.04:LTS python2.7 0 2.7.12-1ubuntu0~16.04.2
Ubuntu:16.04:LTS python3.5 0 3.5.2-2ubuntu0~16.04.4
openSUSE:Tumbleweed python 0 2.7.18-8.1

Related vulnerabilities