Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements used in a Command ('C
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.
- Published
- Sep 18, 2018
- Updated
- Oct 8, 2026
- EPSS
- 20.1% · 97th percentile
- CWE
- CWE-77
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
45
Plan
Add it to your regular patch cycle.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 6 / 30 · 20.1%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
| Vendor | Product | CPE |
|---|---|---|
| python | python | cpe:2.3:a:python:python |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| opensuse | leap | cpe:2.3:o:opensuse:leap |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- canonical ubuntu linux12.04
- canonical ubuntu linux14.04
- canonical ubuntu linux16.04
- canonical ubuntu linux18.04
- debian debian linux8.0
- debian debian linux9.0
- opensuse leap15.1
- python python2.7.0 and later · before 2.7.16
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:11 | python2.7 | before 2.7.15-5 | 2.7.15-5 |
| Debian:8 | python2.7 | before 2.7.9-2+deb8u2 | 2.7.9-2+deb8u2 |
| Debian:8 | python3.4 | before 3.4.2-1+deb8u1 | 3.4.2-1+deb8u1 |
| Debian:9 | python2.7 | before 2.7.13-2+deb9u3 | 2.7.13-2+deb9u3 |
| openSUSE:Leap 15.1 | python3 | before 3.6.10-lp151.6.7.1 | 3.6.10-lp151.6.7.1 |
| openSUSE:Leap 15.1 | python3-base | before 3.6.10-lp151.6.7.1 | 3.6.10-lp151.6.7.1 |
| openSUSE:Tumbleweed | python36 | before 3.6.15-1.1 | 3.6.15-1.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | python | before 2.7.13-28.16.1 | 2.7.13-28.16.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | python-base | before 2.7.13-28.16.1 | 2.7.13-28.16.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 | python | before 2.7.14-7.3.1 | 2.7.14-7.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 | python-base | before 2.7.14-7.3.1 | 2.7.14-7.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 | python3 | before 3.6.10-3.42.2 | 3.6.10-3.42.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 | python3-base | before 3.6.10-3.42.2 | 3.6.10-3.42.2 |
| SUSE:Linux Enterprise Server 12 SP3 | python-doc | before 2.7.13-28.16.1 | 2.7.13-28.16.1 |
| SUSE:Linux Enterprise Server 12 SP5 | python36 | before 3.6.10-4.3.5 | 3.6.10-4.3.5 |
| SUSE:Linux Enterprise Server 12 SP5 | python36-base | before 3.6.10-4.3.5 | 3.6.10-4.3.5 |
| SUSE:OpenStack Cloud 7 | python3 | before 3.4.6-25.29.1 | 3.4.6-25.29.1 |
| SUSE:OpenStack Cloud 7 | python3-base | before 3.4.6-25.29.1 | 3.4.6-25.29.1 |
Same product
python: all recordsOther highest-scoring records for the same primary product.
- CVE-2016-5636Integer overflow in the get_data function in zipimport.c in CPython (aka Python) before 2.7.12, 3.x before 3.4.5, and 3.5.x before 3.5.2 all47Plan
- CVE-2007-4559Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile module in Python allows user-assisted remot47Plan
- CVE-2021-3177Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Pyth46Plan
- CVE-2014-4650The CGIHTTPServer module in Python 2.7.5 and 3.3.4 does not properly handle URLs in which URL encoding is used for path separators, which al46Plan
- CVE-2020-27619In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.42Plan
- CVE-2022-48565An XML External Entity (XXE) issue was discovered in Python through 3.9.1.41Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:python2.7 | 2.7.15-5 · Debian:11 | Package registry (OSV) |
| debian:python3.4 | 3.4.2-1+deb8u1 · Debian:8 | Package registry (OSV) |
| opensuse:python3 | 3.6.10-lp151.6.7.1 · openSUSE:Leap 15.1 | Package registry (OSV) |
| opensuse:python3-base | 3.6.10-lp151.6.7.1 · openSUSE:Leap 15.1 | Package registry (OSV) |
| opensuse:python36 | 3.6.15-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| suse:python | 2.7.14-7.3.1 · SUSE:Linux Enterprise Module for Basesystem 15 | Package registry (OSV) |
| suse:python-base | 2.7.14-7.3.1 · SUSE:Linux Enterprise Module for Basesystem 15 | Package registry (OSV) |
| suse:python-doc | 2.7.13-28.16.1 · SUSE:Linux Enterprise Server 12 SP3 | Package registry (OSV) |
| suse:python3 | 3.4.6-25.29.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:python3-base | 3.4.6-25.29.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:python36 | 3.6.10-4.3.5 · SUSE:Linux Enterprise Server 12 SP5 | Package registry (OSV) |
| suse:python36-base | 3.6.10-4.3.5 · SUSE:Linux Enterprise Server 12 SP5 | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Proof-of-concept repository on GitHub ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Proof-of-concept repository on GitHub | stars:3 | 2018-09-14 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- First PoC-5 d
- Published
- TodayOct 10, 2026+2944 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-77 · Improper Neutralization of Special Elements used in a Command ('Command Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- LDAP InjectionCAPEC-136likelihood: High · High
- Command DelimitersCAPEC-15likelihood: High · High
- IMAP/SMTP Command InjectionCAPEC-183Medium
- Command InjectionCAPEC-248likelihood: Medium · High
- Manipulating Writeable Terminal DevicesCAPEC-40likelihood: High · Very High
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Manipulating Writeable Configuration FilesCAPEC-75likelihood: High · Very High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
ATT&CK techniques
—
Change log
- SSVC exploitation— → none
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- lists.opensuse.org/opensuse-security-announce/2020-01/msg00040.html
- bugs.python.org/issue34540
- github.com/python/cpython/pull/8985
- github.com/python/cpython/pull/8985/commits/add531a1e55b0a739b0f42582f1c9747e5649ace
- lists.debian.org/debian-lts-announce/2018/09/msg00030.html
- lists.debian.org/debian-lts-announce/2018/09/msg00031.html
- mega.nz/#%21JUFiCC4R%21mq-jQ8ySFwIhX6WMDujaZuNBfttDVt7DETlfOIQE1ig
- security.netapp.com/advisory/ntap-20230309-0002/
- usn.ubuntu.com/3817-1/
- usn.ubuntu.com/3817-2/
- www.debian.org/security/2018/dsa-4306
Vendor advisories and official records. Exploit/PoC links are deliberately left out.