CVE-2015-20107 json
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.
published 2022-04-13 4 y ago modified 2026-10-14 26 d ago also EUVD-2015-2111
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.8%
- EPSS 2.8% chance of exploitation in 30 days, percentile 86%
- public exploits
- 0
- none known
Summary
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
Patch / fix
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP V3.1.5
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- pypy3 Debian 14, Debian 13, Debian 12 7.3.11+dfsg-1
debian advisories DEBIAN-CVE-2015-20107
- python2.7 Ubuntu 18.04 LTS 2.7.17-1~18.04ubuntu1.8
- python2.7 Ubuntu 20.04 LTS 2.7.18-1~20.04.3
- python2.7 Ubuntu 22.04 LTS 2.7.18-13ubuntu1.1
- python3.6 Ubuntu 18.04 LTS 3.6.9-1~18.04ubuntu1.8
- python3.8 Ubuntu 20.04 LTS 3.8.10-0ubuntu1~20.04.5
- python3.10 Ubuntu 22.04 LTS 3.10.4-3ubuntu0.1
- python2.7 Ubuntu Pro 14.04 LTS 2.7.6-8ubuntu0.6+esm11
- python2.7 Ubuntu Pro 16.04 LTS 2.7.12-1ubuntu0~16.04.18+esm2
ubuntu advisories UBUNTU-CVE-2015-20107
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rh-python38-python RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- rh-python38-python-idle RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- rh-python38-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- rh-python38-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- rh-python38-python-tkinter RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- rh-python38-python-rpm-macros RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- rh-python38-python-srpm-macros RHEL 3 SOFTWARE_COLLECTIONS 3.8.14-1.el7
- python3.9 RHEL 9 3.9.14-1.el9
red hat advisories RHSA-2022:6766RHSA-2022:8353RHSA-2022:6457RHSA-2022:7581RHSA-2022:7592RHSA-2022:7593
- python310 SLE Module for Python 3 15 SP4, openSUSE Leap 15.4 3.10.10-150400.4.22.1
- python310-core SLE Module for Python 3 15 SP4, openSUSE Leap 15.4 3.10.10-150400.4.22.1
- python310-documentation openSUSE Leap 15.4 3.10.10-150400.4.22.1
- python39 SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Real Time 15 SP3 +6 more 3.9.16-150300.4.24.1
- python39-core SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Real Time 15 SP3 +6 more 3.9.16-150300.4.24.1
- python39-documentation openSUSE Leap 15.4 3.9.16-150300.4.24.1
- python3 SLE Module for Basesystem 15 SP4, SLE Module for Basesystem 15 SP3, SLE Micro 5.2 +3 more 3.6.15-150300.10.27.1
- python3-core SLE Module for Development Tools 15 SP4, SLE Module for Development Tools 15 SP3, SLE Module for Basesystem 15 SP4 +5 more 3.6.15-150300.10.27.1
suse advisories SUSE-SU-2023:0748-1SUSE-SU-2023:0707-1SUSE-SU-2022:2357-2SUSE-SU-2022:2357-1SUSE-SU-2022:2351-1SUSE-SU-2022:2344-1
- python openSUSE Tumbleweed 2.7.18-22.1
- python39 openSUSE Tumbleweed 3.9.13-2.1
- python310 openSUSE Tumbleweed 3.10.5-2.1
opensuse advisories openSUSE-SU-2024:12143-1openSUSE-SU-2024:12150-1openSUSE-SU-2024:12152-1
- python3 AlmaLinux 9 3.9.14-1.el9
- python3-idle AlmaLinux 9 3.9.14-1.el9
- python3-libs AlmaLinux 9 3.9.14-1.el9
- python3-test AlmaLinux 9 3.9.14-1.el9
- python3-tkinter AlmaLinux 9 3.9.14-1.el9
- python-unversioned-command AlmaLinux 9 3.9.14-1.el9
- python38 AlmaLinux 8 3.8.13-1.module_el8.7.0+3344+99a6a656
- python38-py AlmaLinux 8 1.8.0-8.module_el8.6.0+2778+cd494b30
almalinux advisories ALSA-2022:8353ALSA-2022:7581ALSA-2022:7592ALSA-2022:7593ALSA-2022:6457
- python3.9 Rocky Linux 9 3.9.14-1.el9_1.1
- pytz Rocky Linux 8 2017.2-12.module+el8.5.0+706+735ec4b3
- pytz Rocky Linux 8 2017.2-12.module+el8.4.0+403+9ae17a31
- babel Rocky Linux 8 2.5.1-10.module+el8.5.0+706+735ec4b3
- numpy Rocky Linux 8 1:1.14.2-16.module+el8.5.0+706+735ec4b3
- numpy Rocky Linux 8 1:1.14.2-16.module+el8.4.0+403+9ae17a31
- scipy Rocky Linux 8 1.0.0-21.module+el8.5.0+671+195e4563
- Cython Rocky Linux 8 0.28.1-7.module+el8.5.0+706+735ec4b3
rocky linux advisories RLSA-2022:8353RLSA-2022:7593RLSA-2022:7592RLSA-2022:7581
- python3 Alpine 3.24, Alpine 3.23, Alpine 3.22 +5 more 3.10.5-r0
alpine advisories ALPINE-CVE-2015-20107
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2015-20107 updated cvss 7.6
python: mailcap: findmatch() function does not sanitize the second argument
-
Red Hat Enterprise Linux 7 python3, python3-idle, python3-libs, python3-test, python3-tkinteraffected: workaround, no fix planned “Out of support scope”
-
Red Hat Software Collections python27, python27-runtime, python27-scldevelaffected: workaround, no fix planned “Will not fix”
-
Red Hat CodeReady Linux Builder (v. 8) pytest 4.6.6-3.module+el8.4.0+8888+89bc7e79, pytest 6.0.2-2.module+el8.4.0+9822+20bf1249, Cython 0.29.21-5.module+el8.4.0+9822+20bf1249, pybind11 2.7.1-1.module+el8.6.0+12838+640e6226, python-py 1.8.0-8.module+el8.4.0+8888+89bc7e79, python-py 1.10.0-1.module+el8.4.0+9822+20bf1249, +34 morefixed: vendor fix RHSA-2022:7581
-
Red Hat CodeReady Linux Builder (v. 9) python3 3.9.14-1.el9, python3-idle 3.9.14-1.el9, python3-test 3.9.14-1.el9, python3-tkinter 3.9.14-1.el9fixed: vendor fix RHSA-2022:8353
-
Red Hat Enterprise Linux AppStream (v. 8) python3-idle 3.6.8-47.el8_6, python3-test 3.6.8-47.el8_6, platform-python 3.6.8-47.el8_6, python3-tkinter 3.6.8-47.el8_6, pytz 2019.3-3.module+el8.4.0+8888+89bc7e79, scipy 1.3.1-4.module+el8.4.0+8888+89bc7e79, +207 morefixed: vendor fix RHSA-2022:6457
-
Red Hat Enterprise Linux AppStream (v. 9) python3-tkinter 3.9.14-1.el9, python-unversioned-command 3.9.14-1.el9fixed: vendor fix RHSA-2022:8353
-
Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-47.el8_6, python3-libs 3.6.8-47.el8_6, python3-test 3.6.8-47.el8_6, platform-python 3.6.8-47.el8_6fixed: vendor fix RHSA-2022:6457
-
Red Hat Enterprise Linux BaseOS (v. 9) python3 3.9.14-1.el9, python3.9 3.9.14-1.el9, python3-libs 3.9.14-1.el9fixed: vendor fix RHSA-2022:8353
show 2 moreshow fewer
-
Red Hat Software Collections for RHEL Workstation(v. 7) rh-python38-python 3.8.14-1.el7, rh-python38-python-idle 3.8.14-1.el7, rh-python38-python-libs 3.8.14-1.el7, rh-python38-python-test 3.8.14-1.el7, rh-python38-python-tkinter 3.8.14-1.el7, rh-python38-python-rpm-macros 3.8.14-1.el7, +1 more Red Hat Software Collections for RHEL(v. 7) rh-python38-python 3.8.14-1.el7, rh-python38-python-idle 3.8.14-1.el7, rh-python38-python-libs 3.8.14-1.el7, rh-python38-python-test 3.8.14-1.el7, rh-python38-python-tkinter 3.8.14-1.el7, rh-python38-python-rpm-macros 3.8.14-1.el7, +1 morefixed: vendor fix RHSA-2022:6766
-
Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 8 scipy, python2, python36, python-nose, python-wheel, python2-libs, +24 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-23-348-10 updated cvss 7.6
Siemens SIMATIC S7-1500
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.0, < 3.1.5affected: fixed in V3.1.5, mitigation support.industry.siemens.com
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 32 d ago
Exploit prediction
2.78% chance of exploitation in the next 30 days, higher than 86% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- bugs.python.org https://bugs.python.org/issue24778 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.6 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L |
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 8.0 | AV:N/AC:L/Au:S/C:P/I:C/A:P |
Affected products
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
Classification
- Weakness
-
- CWE-77 Improper Neutralization of Special Elements used in a Command
References
-
python-security.readthedocs.io
/vuln/mailcap-shell-injection.html
patch, third-party-advisory
-
bugs.python.org
/issue24778
exploit, issue-tracking, vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/FCIO2W4DUVVMI6L52QCC4TT2B3K5VWHS/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ERYMM2QVDPOJLX4LYXWYIQN5FOIJLDRY/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/FIRUTX47BJD2HYJDLMI7JJBVCYFAPKAQ/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/46KWPTI72SSEOF53DOYQBQOCN4QQB2GE/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ONXSGLASNLGFL57YU6WT6Y5YURSFV43U/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/MYG3EMFR7ZHC46TDNM7SNWO64A3W7EUF/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/Y4E2WBEJ42CGLGDHD6ZXOLZ2W6G3YOVD/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/XO2H6CKWLRGTTZCGUQVELW6LUH437Q3O/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/W5664BGZVTA46LQDNTYX5THG6CN4FYJX/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/UIOJUZ5JMEMGSKNISTOVI4PDP36FDL5Y/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/KAY6VBNVEFUXKJF37WFHYXUSRDEK34N3/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/F3LNY2NHM6J22O6Q5ANOE3SZRK3OACKR/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/GPCLGZZJPVXFWUWVV5WCD5FNUAFLKBDN/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/5DBVY4YC2P6EPZZ2DROOXHDOWZ4BJFLW/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/HAI2GBC7WKH7J5NH6J2IW5RT3VF2SF5M/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6QIKVSW3H6W2GQGDE5DTIWLGFNH6KKEW/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/AKGMYDVKI3XNM27B6I6RQ6QV3TVJAUCG/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/57NECACX333A3BBZM2TR2VZ4ZE3UG3SN/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/PTTZGLD2YBMMG6U6F5HOTPOGGPBIURMA/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/53TQZFLS6O3FLIMVSXFEEPZSWLDZLBOX/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/WXF6MQ74HVIDDSR5AE2UDR24I6D4FEPC/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/IFGV7P2PYFBMK32OKHCAC2ZPJQV5AUDF/
vendor-advisory
-
security.gentoo.org
/glsa/202305-02
vendor-advisory
-
github.com
/python/cpython/issues/68966
issue-tracking, third-party-advisory
-
security.netapp.com
/advisory/ntap-20220616-0001/
third-party-advisory
-
lists.debian.org
/debian-lts-announce/2023/05/msg00024.html
mailing-list
-
lists.debian.org
/debian-lts-announce/2023/06/msg00039.html
mailing-list
- lists.debian.org /debian-lts-announce/2024/12/msg00000.html
- cert-portal.siemens.com /productcert/html/ssa-398330.html
Sources
- CVE List CVE-2015-20107
- NVD CVE-2015-20107
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.