CVE-2015-20107 Command injection in n/a

High 7.8 Published Updated

Attackers can inject shell commands via the mailcap module if applications pass untrusted filenames without validation, leading to code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2015-20107?

CVE-2015-20107 is a high-severity command injection vulnerability in Fedoraproject Fedora, published on 13 Apr 2022. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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

Weakness: CWE-77

Which versions are affected by CVE-2015-20107?

It affects 5 products.

Linux distribution packages (40)
babel AlmaLinux:8All versions2.5.1-10.module_el8.6.0+2781+fed64c13
python-nose-docs AlmaLinux:8All versions1.3.7-31.module_el8.6.0+2781+fed64c13
python-psycopg2-doc AlmaLinux:8All versions2.7.5-7.module_el8.6.0+2781+fed64c13
python-psycopg2-doc AlmaLinux:8All versions2.7.5-7.module_el8.6.0+3162+01a09e5a
python-sqlalchemy-doc AlmaLinux:8All versions1.3.2-2.module_el8.6.0+2781+fed64c13
python2 AlmaLinux:8All versions2.7.18-11.module_el8.7.0+3331+6c5bd851.alma
python2-Cython AlmaLinux:8All versions0.28.1-7.module_el8.6.0+2781+fed64c13
python2-Cython AlmaLinux:8All versions0.28.1-7.module_el8.6.0+3162+01a09e5a
python2-PyMySQL AlmaLinux:8All versions0.8.0-10.module_el8.6.0+2781+fed64c13
python2-attrs AlmaLinux:8All versions17.4.0-10.module_el8.6.0+2781+fed64c13
python2-babel AlmaLinux:8All versions2.5.1-10.module_el8.6.0+2781+fed64c13
python2-backports AlmaLinux:8All versions1.0-16.module_el8.6.0+2781+fed64c13
python2-backports AlmaLinux:8All versions1.0-16.module_el8.6.0+3162+01a09e5a
python2-backports-ssl_match_hostname AlmaLinux:8All versions3.5.0.1-12.module_el8.6.0+2781+fed64c13
python2-bson AlmaLinux:8All versions3.7.0-1.module_el8.6.0+2781+fed64c13
python2-bson AlmaLinux:8All versions3.7.0-1.module_el8.6.0+3162+01a09e5a
python2-chardet AlmaLinux:8All versions3.0.4-10.module_el8.6.0+2781+fed64c13
python2-coverage AlmaLinux:8All versions4.5.1-4.module_el8.6.0+2781+fed64c13
python2-coverage AlmaLinux:8All versions4.5.1-4.module_el8.6.0+3162+01a09e5a
python2-debug AlmaLinux:8All versions2.7.18-11.module_el8.7.0+3331+6c5bd851.alma
python2-devel AlmaLinux:8All versions2.7.18-11.module_el8.7.0+3331+6c5bd851.alma
python2-dns AlmaLinux:8All versions1.15.0-10.module_el8.6.0+2781+fed64c13
python2-docs AlmaLinux:8All versions2.7.16-2.module_el8.6.0+2781+fed64c13
python2-docs-info AlmaLinux:8All versions2.7.16-2.module_el8.6.0+2781+fed64c13
python2-docutils AlmaLinux:8All versions0.14-12.module_el8.6.0+2781+fed64c13
python2-funcsigs AlmaLinux:8All versions1.0.2-13.module_el8.6.0+2781+fed64c13
python2-idna AlmaLinux:8All versions2.5-7.module_el8.6.0+2781+fed64c13
python2-ipaddress AlmaLinux:8All versions1.0.18-6.module_el8.6.0+2781+fed64c13
python2-jinja2 AlmaLinux:8All versions2.10-9.module_el8.6.0+2781+fed64c13
python2-libs AlmaLinux:8All versions2.7.18-11.module_el8.7.0+3331+6c5bd851.alma
python2-lxml AlmaLinux:8All versions4.2.3-6.module_el8.6.0+2781+fed64c13
python2-lxml AlmaLinux:8All versions4.2.3-6.module_el8.6.0+3162+01a09e5a
python2-markupsafe AlmaLinux:8All versions0.23-19.module_el8.6.0+2781+fed64c13
python2-markupsafe AlmaLinux:8All versions0.23-19.module_el8.6.0+3162+01a09e5a
python2-mock AlmaLinux:8All versions2.0.0-13.module_el8.6.0+2781+fed64c13
python2-nose AlmaLinux:8All versions1.3.7-31.module_el8.6.0+2781+fed64c13
python2-numpy AlmaLinux:8All versions1:1.14.2-16.module_el8.6.0+2781+fed64c13
python2-numpy AlmaLinux:8All versions1:1.14.2-16.module_el8.6.0+3162+01a09e5a
python2-numpy-doc AlmaLinux:8All versions1:1.14.2-16.module_el8.6.0+2781+fed64c13
python2-numpy-f2py AlmaLinux:8All versions1:1.14.2-16.module_el8.6.0+2781+fed64c13

Products include Fedoraproject Fedora, Netapp Active Iq Unified Manager, Netapp Ontap Select Deploy Administration Utility, Netapp Snapcenter, Python Python.

How do I fix CVE-2015-20107?

Apply the vendor's patch.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2015-20107 being exploited?

There is no known exploitation of CVE-2015-20107 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALPINE-CVE-2015-20107, ALSA-2022:7581, ALSA-2022:7592, ALSA-2022:7593, AZL-84293, AZL-9417 and 29 more.

Is CVE-2015-20107 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free