CVE-2015-20107: Input Validation

Published Aug 2, 2015
·
Updated

A command injection vulnerability was found in Python 2.x and 3.x, specifically within the mailcap module. Mailcap core-module is based on the format documented in RFC 1524. The “findmatch()” function does not sanitise the second argument (filename). As a result, the legitimate command (that is used for opening the specified mime type) is concatenated with an arbitrary command, injected by an attacker.

Other sources

A command injection vulnerability was found in the Python mailcap module. The issue occurs due to not adding escape characters into the system mailcap file commands. This flaw allows attackers to inject shell commands into applications that call the mailcap.findmatch function with untrusted input.

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

Python could allow a remote attacker to execute arbitrary commands on the system, caused by improper input validation in mailcap module. By sending a specially-crafted request, an attacker could exploit this vulnerability to execute arbitrary commands on the system.

IBM

Affected Software

18 affected componentsFixes available
redhat/python3<0:3.6.8-47.el8_6
0:3.6.8-47.el8_6
redhat/python3.9<0:3.9.14-1.el9
0:3.9.14-1.el9
redhat/rh-python38-python<0:3.8.14-1.el7
0:3.8.14-1.el7
IBM Cloud Pak for Security<=1.10.0.0 - 1.10.11.0
IBM QRadar Suite Software<=1.10.12.0 - 1.10.16.0
debian/python2.7<=2.7.18-8+deb11u1
debian/python3.9<=3.9.2-1
3.9.2-1+deb11u3
Python Python>=3.7.0<=3.7.15
Python Python>=3.8.0<=3.8.15
Python Python>=3.9.0<=3.9.15
Python Python>=3.10.0<3.10.8
NetApp Active Iq Unified Manager Vmware Vsphere
NetApp Active Iq Unified Manager Windows
NetApp ONTAP Select Deploy administration utility
NetApp Snapcenter
Fedoraproject Fedora=35
Fedoraproject Fedora=36
Fedoraproject Fedora=37

Remediation

Information

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.

Event History

Aug 2, 2015
CVE Published
12:00 AM
Apr 13, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 14, 2022
Data Sourced
via Red Hat·05:03 AM
DescriptionSeverityAffected Software
Jan 12, 2024
Data Sourced
via Launchpad·06:02 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·06:40 PM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2015-20107?

CVE-2015-20107 is a command injection vulnerability found in the Python mailcap module.

2

How does CVE-2015-20107 affect Python?

CVE-2015-20107 affects Python versions up to 3.10.8.

3

What is the severity of CVE-2015-20107?

CVE-2015-20107 has a severity rating of high.

4

How can CVE-2015-20107 be exploited?

CVE-2015-20107 can be exploited by injecting shell commands into applications that call mailcap.findmatch with untrusted input.

5

What is the remedy for CVE-2015-20107?

The recommended remedy for CVE-2015-20107 is to update to the fixed versions of Python mentioned in the references.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203