CVE-2018-1000802CWE-77command-injection

CVE-2018-1000802

Critical · published September 18, 2018

CVSS v3.1
9.8
EPSS
20%
Percentile
97.5
In the wild
Unconfirmed
What it is

⚠️ A sneaky command injection flaw is hiding in Python's shutil module! This vulnerability lets attackers manipulate commands by passing unfiltered user input, potentially causing chaos on your system. 🔥 Think of this like a chef preparing a meal without checking the ingredients — if someone slips a harmful item into the mix, it could ruin the entire dish. Here, an attacker can inject arbitrary commands, much like adding unwanted spices that could spoil the whole pot. The consequences could be dire! An attacker could gain access to sensitive files, leading to information leaks, or even trigger a denial of service by overwhelming the system. This could place your entire project at risk, with the potential for widespread data exposure.

Put simply

Think of this like a chef preparing a meal without checking the ingredients — if someone slips a harmful item into the mix, it could ruin the entire dish. Here, an attacker can inject arbitrary commands, much like adding unwanted spices that could spoil the whole pot. This vulnerability in CPython 2.7's shutil module (specifically the make_archive function) allows for command injection due to improper neutralization of special elements in user input. When unfiltered input is passed to this function, it can execute arbitrary commands on the server.

What to do

The consequences could be dire! An attacker could gain access to sensitive files, leading to information leaks, or even trigger a denial of service by overwhelming the system. This could place your entire project at risk, with the potential for widespread data exposure. Ensure you're not using CPython 2.7; if you are, update to the patched version that includes commit add531a1e55b0a739b0f42582f1c9747e5649ace. Additionally, always validate and sanitize user input to avoid similar vulnerabilities in the future. You've got this! By following these steps, you'll keep your system safe and sound. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.20126 · 97.5th percentile
Weakness
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')
Published
2018-09-18T21:29Z
Affected products (11)
ProductVersionsFixed in
python/python≥ 2.7.0, < 2.7.162.7.16
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
canonical/ubuntu_linuxall versions—
debian/debian_linuxall versions—
debian/debian_linuxall versions—
opensuse/leapall versions—
debian/debian_linuxall versions—
debian/debian_linuxall versions—
opensuse/leapall versions—
References (22)
http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html · [email protected]https://bugs.python.org/issue34540 · [email protected]https://github.com/python/cpython/pull/8985 · [email protected]https://github.com/python/cpython/pull/8985/commits/add531a1e55b0a739b0f42582f1c9747e5649ace · [email protected]https://lists.debian.org/debian-lts-announce/2018/09/msg00030.html · [email protected]https://lists.debian.org/debian-lts-announce/2018/09/msg00031.html · [email protected]https://mega.nz/#%21JUFiCC4R%21mq-jQ8ySFwIhX6WMDujaZuNBfttDVt7DETlfOIQE1ig · [email protected]https://security.netapp.com/advisory/ntap-20230309-0002/ · [email protected]https://usn.ubuntu.com/3817-1/ · [email protected]https://usn.ubuntu.com/3817-2/ · [email protected]https://www.debian.org/security/2018/dsa-4306 · [email protected]http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html · af854a3a-2127-422b-91ae-364da2661108https://bugs.python.org/issue34540 · af854a3a-2127-422b-91ae-364da2661108https://github.com/python/cpython/pull/8985 · af854a3a-2127-422b-91ae-364da2661108https://github.com/python/cpython/pull/8985/commits/add531a1e55b0a739b0f42582f1c9747e5649ace · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2018/09/msg00030.html · af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2018/09/msg00031.html · af854a3a-2127-422b-91ae-364da2661108https://mega.nz/#%21JUFiCC4R%21mq-jQ8ySFwIhX6WMDujaZuNBfttDVt7DETlfOIQE1ig · af854a3a-2127-422b-91ae-364da2661108https://security.netapp.com/advisory/ntap-20230309-0002/ · af854a3a-2127-422b-91ae-364da2661108https://usn.ubuntu.com/3817-1/ · af854a3a-2127-422b-91ae-364da2661108https://usn.ubuntu.com/3817-2/ · af854a3a-2127-422b-91ae-364da2661108https://www.debian.org/security/2018/dsa-4306 · af854a3a-2127-422b-91ae-364da2661108
EPSS history
Timeline
  • 18 SEP 00:00Z
    Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')…
    cvelistv5