Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    UBUNTU-CVE-2017-1000158 (CVE-2017-1000158)

    Vulnerability from osv_ubuntu – Published: 2017-11-17 00:00 – Updated: 2026-11-24 09:42 – Source website
    VLAI
    Details

    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)

    Upstream
    Impacted products
    Ecosystem Package Version
    Ubuntu:14.04:LTS python2.7
    pkg:deb/ubuntu/python2.7@2.7.6-8ubuntu0.4?arch=source&distro=trusty
    Affected: < 2.7.6-8ubuntu0.4 (ecosystem)
    2.7.5-8ubuntu32.7.5-8ubuntu42.7.6-22.7.6-2ubuntu12.7.6-32.7.6-3ubuntu12.7.6-42.7.6-4ubuntu12.7.6-52.7.6-7 and 3 more (see JSON)
    Ubuntu:14.04:LTS python3.4
    pkg:deb/ubuntu/python3.4@3.4.3-1ubuntu1~14.04.6?arch=source&distro=trusty
    Affected: < 3.4.3-1ubuntu1~14.04.6 (ecosystem)
    3.4~b1-0ubuntu33.4~b1-4ubuntu43.4~b1-4ubuntu63.4~b1-5ubuntu23.4~b2-13.4~b3-1ubuntu13.4~rc1-1build13.4~rc2-13.4~rc3-0ubuntu13.4.0-1 and 6 more (see JSON)
    Ubuntu:14.04:LTS python3.5
    pkg:deb/ubuntu/python3.5@3.5.2-2ubuntu0~16.04.4~14.04.1?arch=source&distro=trusty
    Affected: < 3.5.2-2ubuntu0~16.04.4~14.04.1 (ecosystem)
    Ubuntu:16.04:LTS python2.7
    pkg:deb/ubuntu/python2.7@2.7.12-1ubuntu0~16.04.2?arch=source&distro=xenial
    Affected: < 2.7.12-1ubuntu0~16.04.2 (ecosystem)
    2.7.10-4ubuntu12.7.10-4ubuntu22.7.11-22.7.11-32.7.11-42.7.11-62.7.11-72.7.11-7ubuntu12.7.12-1~16.042.7.12-1ubuntu0~16.04.1
    Ubuntu:16.04:LTS python3.5
    pkg:deb/ubuntu/python3.5@3.5.2-2ubuntu0~16.04.4?arch=source&distro=xenial
    Affected: < 3.5.2-2ubuntu0~16.04.4 (ecosystem)
    3.5.0-33.5.0-3ubuntu13.5.1~rc1-2ubuntu13.5.1-13.5.1-23.5.1-33.5.1-53.5.1-6ubuntu13.5.1-6ubuntu23.5.1-9ubuntu1 and 6 more (see JSON)

    {
      "affected": [
        {
          "ecosystem_specific": {
            "availability": "No subscription required",
            "binaries": [
              {
                "binary_name": "idle-python2.7",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "libpython2.7",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "libpython2.7-minimal",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "libpython2.7-stdlib",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "libpython2.7-testsuite",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "python2.7",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "python2.7-examples",
                "binary_version": "2.7.6-8ubuntu0.4"
              },
              {
                "binary_name": "python2.7-minimal",
                "binary_version": "2.7.6-8ubuntu0.4"
              }
            ]
          },
          "package": {
            "ecosystem": "Ubuntu:14.04:LTS",
            "name": "python2.7",
            "purl": "pkg:deb/ubuntu/python2.7@2.7.6-8ubuntu0.4?arch=source\u0026distro=trusty"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.7.6-8ubuntu0.4"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ],
          "versions": [
            "2.7.5-8ubuntu3",
            "2.7.5-8ubuntu4",
            "2.7.6-2",
            "2.7.6-2ubuntu1",
            "2.7.6-3",
            "2.7.6-3ubuntu1",
            "2.7.6-4",
            "2.7.6-4ubuntu1",
            "2.7.6-5",
            "2.7.6-7",
            "2.7.6-8",
            "2.7.6-8ubuntu0.2",
            "2.7.6-8ubuntu0.3"
          ]
        },
        {
          "ecosystem_specific": {
            "availability": "No subscription required",
            "binaries": [
              {
                "binary_name": "idle-python3.4",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "libpython3.4",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "libpython3.4-minimal",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "libpython3.4-stdlib",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "libpython3.4-testsuite",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "python3.4",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "python3.4-examples",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "python3.4-minimal",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              },
              {
                "binary_name": "python3.4-venv",
                "binary_version": "3.4.3-1ubuntu1~14.04.6"
              }
            ]
          },
          "package": {
            "ecosystem": "Ubuntu:14.04:LTS",
            "name": "python3.4",
            "purl": "pkg:deb/ubuntu/python3.4@3.4.3-1ubuntu1~14.04.6?arch=source\u0026distro=trusty"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.4.3-1ubuntu1~14.04.6"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ],
          "versions": [
            "3.4~b1-0ubuntu3",
            "3.4~b1-4ubuntu4",
            "3.4~b1-4ubuntu6",
            "3.4~b1-5ubuntu2",
            "3.4~b2-1",
            "3.4~b3-1ubuntu1",
            "3.4~rc1-1build1",
            "3.4~rc2-1",
            "3.4~rc3-0ubuntu1",
            "3.4.0-1",
            "3.4.0-2ubuntu1",
            "3.4.0-2ubuntu1.1",
            "3.4.3-1ubuntu1~14.04.1",
            "3.4.3-1ubuntu1~14.04.3",
            "3.4.3-1ubuntu1~14.04.4",
            "3.4.3-1ubuntu1~14.04.5"
          ]
        },
        {
          "ecosystem_specific": {
            "availability": "No subscription required",
            "binaries": [
              {
                "binary_name": "idle-python3.5",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "libpython3.5",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "libpython3.5-minimal",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "libpython3.5-stdlib",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "libpython3.5-testsuite",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "python3.5",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "python3.5-examples",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "python3.5-minimal",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              },
              {
                "binary_name": "python3.5-venv",
                "binary_version": "3.5.2-2ubuntu0~16.04.4~14.04.1"
              }
            ]
          },
          "package": {
            "ecosystem": "Ubuntu:14.04:LTS",
            "name": "python3.5",
            "purl": "pkg:deb/ubuntu/python3.5@3.5.2-2ubuntu0~16.04.4~14.04.1?arch=source\u0026distro=trusty"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.5.2-2ubuntu0~16.04.4~14.04.1"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ],
          "versions": []
        },
        {
          "ecosystem_specific": {
            "availability": "No subscription required",
            "binaries": [
              {
                "binary_name": "idle-python2.7",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "libpython2.7",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "libpython2.7-minimal",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "libpython2.7-stdlib",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "libpython2.7-testsuite",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "python2.7",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "python2.7-examples",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              },
              {
                "binary_name": "python2.7-minimal",
                "binary_version": "2.7.12-1ubuntu0~16.04.2"
              }
            ]
          },
          "package": {
            "ecosystem": "Ubuntu:16.04:LTS",
            "name": "python2.7",
            "purl": "pkg:deb/ubuntu/python2.7@2.7.12-1ubuntu0~16.04.2?arch=source\u0026distro=xenial"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.7.12-1ubuntu0~16.04.2"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ],
          "versions": [
            "2.7.10-4ubuntu1",
            "2.7.10-4ubuntu2",
            "2.7.11-2",
            "2.7.11-3",
            "2.7.11-4",
            "2.7.11-6",
            "2.7.11-7",
            "2.7.11-7ubuntu1",
            "2.7.12-1~16.04",
            "2.7.12-1ubuntu0~16.04.1"
          ]
        },
        {
          "ecosystem_specific": {
            "availability": "No subscription required",
            "binaries": [
              {
                "binary_name": "idle-python3.5",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "libpython3.5",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "libpython3.5-minimal",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "libpython3.5-stdlib",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "libpython3.5-testsuite",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "python3.5",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "python3.5-examples",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "python3.5-minimal",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              },
              {
                "binary_name": "python3.5-venv",
                "binary_version": "3.5.2-2ubuntu0~16.04.4"
              }
            ]
          },
          "package": {
            "ecosystem": "Ubuntu:16.04:LTS",
            "name": "python3.5",
            "purl": "pkg:deb/ubuntu/python3.5@3.5.2-2ubuntu0~16.04.4?arch=source\u0026distro=xenial"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.5.2-2ubuntu0~16.04.4"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ],
          "versions": [
            "3.5.0-3",
            "3.5.0-3ubuntu1",
            "3.5.1~rc1-2ubuntu1",
            "3.5.1-1",
            "3.5.1-2",
            "3.5.1-3",
            "3.5.1-5",
            "3.5.1-6ubuntu1",
            "3.5.1-6ubuntu2",
            "3.5.1-9ubuntu1",
            "3.5.1-10",
            "3.5.2-2~16.01",
            "3.5.2-2~16.04",
            "3.5.2-2ubuntu0~16.04.1",
            "3.5.2-2ubuntu0~16.04.2",
            "3.5.2-2ubuntu0~16.04.3"
          ]
        }
      ],
      "aliases": [],
      "details": "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)",
      "id": "UBUNTU-CVE-2017-1000158",
      "modified": "2026-11-24T09:42:09Z",
      "published": "2017-11-17T00:00:00Z",
      "references": [
        {
          "type": "REPORT",
          "url": "https://ubuntu.com/security/CVE-2017-1000158"
        },
        {
          "type": "REPORT",
          "url": "https://github.com/python/cpython/commit/c3c9db89273fabc62ea1b48389d9a3000c1c03ae"
        },
        {
          "type": "ADVISORY",
          "url": "https://ubuntu.com/security/notices/USN-3496-1"
        },
        {
          "type": "ADVISORY",
          "url": "https://ubuntu.com/security/notices/USN-3496-2"
        },
        {
          "type": "ADVISORY",
          "url": "https://ubuntu.com/security/notices/USN-3496-3"
        },
        {
          "type": "REPORT",
          "url": "https://www.cve.org/CVERecord?id=CVE-2017-1000158"
        }
      ],
      "related": [
        "USN-3496-1",
        "USN-3496-2",
        "USN-3496-3"
      ],
      "schema_version": "1.9.2",
      "severity": [
        {
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
          "source": "NVD",
          "type": "CVSS_V3"
        },
        {
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
          "source": "NVD",
          "type": "CVSS_V3"
        },
        {
          "score": "medium",
          "source": "SELF",
          "type": "Ubuntu"
        }
      ],
      "upstream": [
        "CVE-2017-1000158"
      ]
    }