CVE-2015-20107 Details
Description
In Python (aka CPython) up to 3.10.8, the mailcap module does not add escape characters into commands discovered in the system mailcap file. This may allow attackers to inject shell commands into applications that call mailcap.findmatch with untrusted input (if they lack validation of user-provided filenames or arguments). The fix is also back-ported to 3.7, 3.8, 3.9
A shell command injection vulnerability has been identified in the Python mailcap module, affecting versions through 3.10.4. The issue arises because the mailcap module fails to properly escape commands found in the system mailcap file. This flaw can be exploited by injecting shell commands into applications that use 'mailcap.findmatch' with untrusted input, particularly if those applications do not validate user-provided filenames or arguments. When the crafted filename is processed, the injected commands can be executed via 'os.system()', leading to unauthorized command execution.
Users can upgrade to Python versions 3.11.0, 3.10.8, 3.9.16, 3.8.16, or 3.7.16, all of which include the necessary fix. Instructions for upgrading Python can be found in the Python documentation or through the package manager on most Linux distributions. For PyPy users, upgrading to version 7.3.9 is recommended.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 7, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | [email protected] |
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| python python | >= 3.7.0, <= 3.7.15 >= 3.8.0, <= 3.8.15 >= 3.9.0, <= 3.9.15 >= 3.10.0, < 3.10.8 |
CPE
Remediation
| |
| netapp active iq unified manager | All versions |
CPE
Remediation
| |
| netapp ontap select deploy administration utility | All versions |
CPE
Remediation
| |
| netapp snapcenter | All versions |
CPE
Remediation
| |
| fedoraproject fedora | 35 36 37 |
CPE
Remediation
| |
Change History
24 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 14, 2026 | CVE Modified | siemens-SADP |
| Oct 8, 2026 | CVE Modified | [email protected] |
| Oct 8, 2026 | CVE Modified | CISA-ADP |
| Oct 8, 2026 | CVE Modified | CVE |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 3, 2025 | CVE Modified | CVE |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Nov 7, 2023 | CVE Modified | [email protected] |
| Jun 30, 2023 | CVE Modified | [email protected] |
| May 24, 2023 | CVE Modified | [email protected] |
| May 3, 2023 | CVE Modified | [email protected] |
| Nov 28, 2022 | Modified Analysis | [email protected] |
| Nov 21, 2022 | CVE Modified | [email protected] |
| Nov 14, 2022 | CVE Modified | [email protected] |
| Nov 9, 2022 | Modified Analysis | [email protected] |
| Nov 9, 2022 | CVE Modified | [email protected] |
| Jul 8, 2022 | CVE Modified | [email protected] |
| Jun 26, 2022 | CVE Modified | [email protected] |
| Jun 21, 2022 | CVE Modified | [email protected] |
| Jun 20, 2022 | CVE Modified | [email protected] |
| Jun 19, 2022 | CVE Modified | [email protected] |
| Jun 16, 2022 | CVE Modified | [email protected] |
| Apr 21, 2022 | Initial Analysis | [email protected] |