cve.bz

CVE-2015-20107

7.6 highExploit referenceEPSS 2.8%Fix available

High (7.6). EPSS 2.8% estimated probability of exploitation activity in the next 30 days.

On this page
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

Severity

CVSS 3.1

7.6 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L
EPSS
2.8% (unchanged from 2.8% a week ago; 2.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 87th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-07. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-77 Improper Neutralization of Special Elements used in a Command
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2015-20107 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2015-20107?via=ask-ai-copy and https://cve.bz/cve/CVE-2015-20107?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2015-20107 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2015-20107

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2015-20107](https://cve.bz/cve/badge/CVE-2015-20107.svg)](https://cve.bz/cve/CVE-2015-20107)

HTML:

<a href="https://cve.bz/cve/CVE-2015-20107"><img src="https://cve.bz/cve/badge/CVE-2015-20107.svg" alt="CVE-2015-20107"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pythonfrom 3.7.0 through 3.7.15
python:pythonfrom 3.8.0 through 3.8.15
python:pythonfrom 3.9.0 through 3.9.15
python:pythonfrom 3.10.0 before 3.10.8
fedoraproject:fedora35
fedoraproject:fedora36
fedoraproject:fedora37

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10python2.72.7.16-2+deb10u2DLA-3432-1
Debian10python3.73.7.3-2+deb10u5DLA-3477-1
Debian11python3.93.9.2-1+deb11u2DLA-3980-1
Debian12, 13, 14pypy37.3.11+dfsg-1DEBIAN-CVE-2015-20107
Ubuntu18.04:LTSpython2.72.7.17-1~18.04ubuntu1.8UBUNTU-CVE-2015-20107 USN-5519-1
Ubuntu18.04:LTSpython3.63.6.9-1~18.04ubuntu1.8UBUNTU-CVE-2015-20107 USN-5519-1
Ubuntu20.04:LTSpython2.72.7.18-1~20.04.3UBUNTU-CVE-2015-20107 USN-5519-1
Ubuntu20.04:LTSpython3.83.8.10-0ubuntu1~20.04.5UBUNTU-CVE-2015-20107 USN-5519-1 USN-6891-1
Ubuntu22.04:LTSpython2.72.7.18-13ubuntu1.1UBUNTU-CVE-2015-20107 USN-5519-1
Ubuntu22.04:LTSpython3.103.10.4-3ubuntu0.1UBUNTU-CVE-2015-20107 USN-5519-1 USN-6891-1
UbuntuPro:14.04:LTSpython2.72.7.6-8ubuntu0.6+esm11UBUNTU-CVE-2015-20107 USN-5519-1
UbuntuPro:14.04:LTSpython3.43.4.3-1ubuntu1~14.04.7+esm13UBUNTU-CVE-2015-20107 USN-5519-1
UbuntuPro:14.04:LTSpython3.53.5.2-2ubuntu0~16.04.4~14.04.1+esm1UBUNTU-CVE-2015-20107 USN-6891-1
UbuntuPro:16.04:LTSpython2.72.7.12-1ubuntu0~16.04.18+esm2UBUNTU-CVE-2015-20107 USN-5519-1
UbuntuPro:16.04:LTSpython3.53.5.2-2ubuntu0~16.04.13+esm3UBUNTU-CVE-2015-20107 USN-5519-1 USN-6891-1
UbuntuPro:18.04:LTSpython3.63.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
4 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::appstreamCython, python2-Cython, Cython-debugsource and 1 more0:0.28.1-7.module+el8.1.0+3111+de3f2d8eRHSA-2022:7593
Red Hatenterprise_linux:8::appstreamCython, python38-Cython, Cython-debugsource and 1 more0:0.29.14-4.module+el8.4.0+8888+89bc7e79RHSA-2022:7581
Red Hatenterprise_linux:8::appstreamPyYAML, python2-pyyaml, PyYAML-debugsource and 1 more0:3.12-16.module+el8.1.0+3111+de3f2d8eRHSA-2022:7593
Red Hatenterprise_linux:8::appstreamPyYAML, python38-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.5.0+10721+14d8e0d5RHSA-2022:7581
Red Hatenterprise_linux:8::appstreamPyYAML, python39-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.5.0+10613+59a13ec4RHSA-2022:7592
Red Hatenterprise_linux:8::appstreambabel, python2-babel0:2.5.1-10.module+el8.5.0+11014+88fc0d0bRHSA-2022:7593
Red Hatenterprise_linux:8::appstreambabel, python38-babel0:2.7.0-11.module+el8.5.0+11015+9c1c7c42RHSA-2022:7581
Red Hatenterprise_linux:8::appstreammod_wsgi, python38-mod_wsgi0:4.6.8-4.module+el8.7.0+16653+23ccaf52RHSA-2022:7581
Red Hatenterprise_linux:8::appstreammod_wsgi, python39-mod_wsgi0:4.7.1-5.module+el8.7.0+16654+645aad7fRHSA-2022:7592
Red Hatenterprise_linux:8::appstreamnumpy, python2-numpy, numpy-debugsource and 3 more1:1.14.2-16.module+el8.4.0+9406+221a4565RHSA-2022:7593
Red Hatenterprise_linux:8::appstreamnumpy, python38-numpy, numpy-debugsource and 3 more0:1.17.3-6.module+el8.5.0+12205+a865257aRHSA-2022:7581
Red Hatenterprise_linux:8::appstreamnumpy, python39-numpy, numpy-debugsource and 3 more0:1.19.4-3.module+el8.5.0+12204+54860423RHSA-2022:7592
108 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 17 morepython3, python3-core3.6.15-150000.3.106.1SUSE-SU-2022:2351-1
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 18 morepython, python-base2.7.18-150000.41.1SUSE-SU-2022:2344-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-ESPOS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 5 morepython39, python39-core3.9.16-150300.4.24.1SUSE-SU-2023:0707-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Module for Web and Scripting 12, Linux Enterprise Server 12 SP2-BCL and 12 morepython3, python3-base3.4.10-25.93.1SUSE-SU-2022:2166-1
SUSEHPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP3-BCL and 4 morepython, python-doc, python-base2.7.18-28.87.1SUSE-SU-2022:2249-1
SUSELinux Enterprise Micro 5.2, Linux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Basesystem 15 SP4python3, python3-core3.6.15-150300.10.27.1SUSE-SU-2022:2357-1
SUSELinux Enterprise Module for Basesystem 15 SP3python39, python39-core3.9.13-150300.4.13.1SUSE-SU-2022:2174-1
SUSELinux Enterprise Module for Desktop Applications 15 SP3python2.7.18-150000.41.1SUSE-SU-2022:2344-1
SUSELinux Enterprise Module for Development Tools 15 SP3python39-core3.9.13-150300.4.13.1SUSE-SU-2022:2174-1
SUSELinux Enterprise Module for Development Tools 15 SP3, Linux Enterprise Module for Development Tools 15 SP4python3-core3.6.15-150300.10.27.1SUSE-SU-2022:2357-1
SUSELinux Enterprise Module for Python 3 15 SP4python310, python310-core3.10.10-150400.4.22.1SUSE-SU-2023:0748-1
SUSELinux Enterprise Module for Python 3 15 SP4python310, python310-core3.10.5-150400.4.7.1SUSE-SU-2022:2291-1
4 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3, Leap 15.4python, python-doc, python-base2.7.18-150000.41.1SUSE-SU-2022:2344-1
openSUSELeap 15.3, Leap 15.4python3, python3-core, python3-documentation3.6.15-150300.10.27.1SUSE-SU-2022:2357-1
openSUSELeap 15.3, Leap 15.4python39, python39-core, python39-documentation3.9.13-150300.4.13.1SUSE-SU-2022:2174-1
openSUSELeap 15.4python310, python310-core, python310-documentation3.10.10-150400.4.22.1SUSE-SU-2023:0748-1
openSUSELeap 15.4python310, python310-core, python310-documentation3.10.5-150400.4.7.1SUSE-SU-2022:2291-1
openSUSELeap 15.4python39, python39-core, python39-documentation3.9.16-150300.4.24.1SUSE-SU-2023:0707-1
openSUSELeap Micro 5.2python3, python3-core3.6.15-150300.10.27.1SUSE-SU-2022:2357-2
openSUSETumbleweedpython2.7.18-22.1openSUSE-SU-2024:12143-1
openSUSETumbleweedpython3103.10.5-2.1openSUSE-SU-2024:12152-1
openSUSETumbleweedpython393.9.13-2.1openSUSE-SU-2024:12150-1
AlmaLinux8babel, python2-babel2.5.1-10.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2, python2-libs, python2-test and 4 more2.7.18-11.module_el8.7.0+3331+6c5bd851.almaALSA-2022:7593
AlmaLinux8python2-Cython0.28.1-7.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2-Cython0.28.1-7.module_el8.6.0+3162+01a09e5aALSA-2022:7593
AlmaLinux8python2-PyMySQL0.8.0-10.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2-attrs17.4.0-10.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2-backports1.0-16.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2-backports1.0-16.module_el8.6.0+3162+01a09e5aALSA-2022:7593
AlmaLinux8python2-backports-ssl_match_hostname3.5.0.1-12.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2-bson, python2-pymongo, python2-pymongo-gridfs3.7.0-1.module_el8.6.0+2781+fed64c13ALSA-2022:7593
AlmaLinux8python2-bson, python2-pymongo, python2-pymongo-gridfs3.7.0-1.module_el8.6.0+3162+01a09e5aALSA-2022:7593
AlmaLinux8python2-chardet3.0.4-10.module_el8.6.0+2781+fed64c13ALSA-2022:7593
122 more for AlmaLinux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Versions of python36:3.6/python36 as shipped with Red Hat Enterprise Linux 8 are marked as 'Not affected' as they just provide "symlinks" to the main python3 component, which provides the actual interpreter of the Python programming language.

Red Hat's mitigation

Users should upgrade to the latest version. If this is not possible and the affected version of the Python mailcap module has to be used then applications that use mailcap module should verify user input before passing it to the mailcap module, and the returned command before executing it.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8python3-0:3.6.8-47.el8_6Fixed 2022-09-13RHSA-2022:6457
Red Hat Enterprise Linux 8python38:3.8-8070020220916150349.bd194b04Fixed 2022-11-08RHSA-2022:7581
Red Hat Enterprise Linux 8python38-devel:3.8-8070020220916150349.bd194b04Fixed 2022-11-08RHSA-2022:7581
Red Hat Enterprise Linux 8python39:3.9-8070020220916150556.be1f0497Fixed 2022-11-08RHSA-2022:7592
Red Hat Enterprise Linux 8python39-devel:3.9-8070020220916150556.be1f0497Fixed 2022-11-08RHSA-2022:7592
Red Hat Enterprise Linux 8python27:2.7-8070020220617114255.056aacbcFixed 2022-11-08RHSA-2022:7593
Red Hat Enterprise Linux 9python3.9-0:3.9.14-1.el9Fixed 2022-11-15RHSA-2022:8353
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-0:3.8.14-1.el7Fixed 2022-10-03RHSA-2022:6766
Red Hat Enterprise Linux 6pythonNot affected
Red Hat Enterprise Linux 7pythonNot affected
Red Hat Enterprise Linux 7python3Out of support scope
Red Hat Enterprise Linux 8gimp:flatpak/python2Not affected
Red Hat Enterprise Linux 8inkscape:flatpak/python2Not affected
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Software Collectionspython27Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2015-20107.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-23-348-10Siemens SIMATIC S7-15002023-12-12Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-40 Manipulating Writeable Terminal Devices Likelihood: High · Severity: Very High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-75 Manipulating Writeable Configuration Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-136 LDAP Injection Likelihood: High · Severity: High
  • CAPEC-183 IMAP/SMTP Command Injection Severity: Medium
  • CAPEC-248 Command Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON