Skip to content
OpenAdvisories
Unscored Public exploit CVE-2018-1000802 EUVD-2018-2006GHSA-grfr-pqc4-fqmw

Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('…

Published Sep 18, 2018 · Updated Oct 8, 2026 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 11 python2.7 2.7.15-5 —
Debian 9 python2.7 2.7.13-2+deb9u3 DSA-4306-1
Debian 8 python2.7 2.7.9-2+deb8u2 DLA-1519-1
Debian 8 python3.4 3.4.2-1+deb8u1 DLA-1520-1
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS python2.7 2.7.15~rc1-1ubuntu0.1 USN-3817-1
Ubuntu 16.04 LTS python2.7 2.7.12-1ubuntu0~16.04.4 USN-3817-1
Ubuntu 16.04 LTS python3.5 3.5.2-2ubuntu0~16.04.5 USN-3817-1
Ubuntu 14.04 LTS python2.7 2.7.6-8ubuntu0.5 USN-3817-1
Ubuntu 14.04 LTS python3.4 3.4.3-1ubuntu1~14.04.7 USN-3817-1
ReleasePackageFixed inAdvisory
SLES 15 SP1 python 2.7.17-7.32.2 SUSE-SU-2020:0234-1
SLES 15 SP1 python-base 2.7.17-7.32.1 SUSE-SU-2020:0234-1
SLES 15 SP1 python3 +1 3.6.10-3.42.2 SUSE-SU-2020:0114-1
SLES 15 python +1 2.7.14-7.3.1 SUSE-SU-2020:0234-1, SUSE-SU-2018:3002-1
SLES 15 python3 +1 3.6.10-3.42.2 SUSE-SU-2020:0114-1
SLES 12 SP5 python36 +1 3.6.10-4.3.5 SUSE-SU-2020:0302-1
SLES 12 SP4 python +2 2.7.13-28.16.1 SUSE-SU-2018:3554-2
SLES 12 SP4 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES 12 SP3 python +2 2.7.13-28.16.1 SUSE-SU-2018:3554-1
SLES 12 SP3 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-2, SUSE-SU-2019:2053-1
Show 15 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP2 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES 12 SP1 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES 12 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES 2 python 2.7.17-7.32.2 SUSE-SU-2020:0234-1
SLES 2 python-base 2.7.17-7.32.1 SUSE-SU-2020:0234-1
SLES for SAP 12 SP5 python36 +1 3.6.10-4.3.5 SUSE-SU-2020:0302-1
SLES for SAP 12 SP4 python +2 2.7.13-28.16.1 SUSE-SU-2018:3554-2
SLES for SAP 12 SP4 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES for SAP 12 SP3 python +2 2.7.13-28.16.1 SUSE-SU-2018:3554-1
SLES for SAP 12 SP3 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES for SAP 12 SP2 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SLES for SAP 12 SP1 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SUSE OpenStack Cloud Crowbar 8 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-2
SUSE OpenStack Cloud 8 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SUSE OpenStack Cloud 7 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
SUSE HPE Helion OpenStack 8 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-2
SUSE Enterprise Storage 5 python 2.7.13-28.16.1 SUSE-SU-2018:3554-1
SUSE Enterprise Storage 5 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-2, SUSE-SU-2019:2053-1
SUSE Enterprise Storage 4 python3 +1 3.4.6-25.29.1 SUSE-SU-2019:2053-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python 2.7.18-8.1 openSUSE-SU-2024:11202-1
openSUSE Tumbleweed python36 3.6.15-1.1 openSUSE-SU-2024:11284-1
openSUSE Leap 15.1 python3 +1 3.6.10-lp151.6.7.1 openSUSE-SU-2020:0086-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 16

References