---
id: CVE-2018-1000802
title: >-
  Python Software Foundation Python (CPython) version 2.7 contains a CWE-77:
  Improper Neutralization of Special Elements used in a Command ('Command
  Injection') vulnerability in shutil module (make_archive function) that can
  result in Deni…
summary: >-
  Python Software Foundation Python (CPython) version 2.7 contains a CWE-77:
  Improper Neutralization of Special Elements used in a Command ('Command
  Injection') vulnerability in shutil module (make_archive function) that can
  result in Deni…
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-77
vendor: python
product: python
affected:
  - 'python >= 2.7.0, < 2.7.16'
  - ubuntu_linux = 12.04
  - ubuntu_linux = 14.04
  - ubuntu_linux = 16.04
  - ubuntu_linux = 18.04
  - debian_linux = 8.0
  - debian_linux = 9.0
  - leap = 15.1
patched:
  - python 2.7.16
published: '2018-09-18'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T21:17:06.730'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2018-1000802'
references:
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html'
    label: cve@mitre.org
  - url: 'https://bugs.python.org/issue34540'
    label: cve@mitre.org
  - url: 'https://github.com/python/cpython/pull/8985'
    label: cve@mitre.org
  - url: >-
      https://github.com/python/cpython/pull/8985/commits/add531a1e55b0a739b0f42582f1c9747e5649ace
    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://mega.nz/#%21JUFiCC4R%21mq-jQ8ySFwIhX6WMDujaZuNBfttDVt7DETlfOIQE1ig'
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20230309-0002/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/3817-1/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/3817-2/'
    label: cve@mitre.org
  - url: 'https://www.debian.org/security/2018/dsa-4306'
    label: cve@mitre.org
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://bugs.python.org/issue34540'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/python/cpython/pull/8985'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://github.com/python/cpython/pull/8985/commits/add531a1e55b0a739b0f42582f1c9747e5649ace
    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://mega.nz/#%21JUFiCC4R%21mq-jQ8ySFwIhX6WMDujaZuNBfttDVt7DETlfOIQE1ig'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20230309-0002/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/3817-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/3817-2/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.debian.org/security/2018/dsa-4306'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
  - exploit-available
epss: 0.20126
epssPercentile: 0.97398
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/tna0y/CVE-2018-1000802-PoC'
  checkedAt: '2026-10-08T22:12:29.972Z'
exploitAvailable: true
ingestedAt: '2026-10-08T22:11:53.694Z'
---

## Overview

Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') vulnerability in shutil module (make_archive function) that can result in Denial of service, Information gain via injection of arbitrary files on the system or entire drive. This attack appear to be exploitable via Passage of unfiltered user input to the function. This vulnerability appears to have been fixed in after commit add531a1e55b0a739b0f42582f1c9747e5649ace.

## Affected

- `python >= 2.7.0, < 2.7.16`
- `ubuntu_linux = 12.04`
- `ubuntu_linux = 14.04`
- `ubuntu_linux = 16.04`
- `ubuntu_linux = 18.04`
- `debian_linux = 8.0`
- `debian_linux = 9.0`
- `leap = 15.1`

## Remediation

Upgrade past the affected range:

- `python 2.7.16`
