CVE-2015-20107
A public proof of concept exists; no exploitation attested.
- Published2022-04-13
- Fixed in3.10.8
- WeaknessCWE-77
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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
Timeline
dates in UTC- 2022-04-1316:15CVE publishedNVD
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.10 | ≥ 3.10.0, < 3.10.8 | 3.10.8 | NVD |
| 3.7 | ≥ 3.7.0, ≤ 3.7.15 | no fix published | NVD |
| 3.8 | ≥ 3.8.0, ≤ 3.8.15 | no fix published | NVD |
| 3.9 | ≥ 3.9.0, ≤ 3.9.15 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 35.x | = 35 | no fix published | NVD |
| 36.x | = 36 | no fix published | NVD |
| 37.x | = 37 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| — | all versions | no fix published | NVD |
2 more products in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- babelRocky Linux:8all versions · fixed in 0:2.5.1-10.module+el8.5.0+706+735ec4b3
- babelRocky Linux:8all versions · fixed in 0:2.7.0-11.module+el8.5.0+672+ab6eb015
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.5.1-10.module+el8.5.0+11014+88fc0d0band 1 other package
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.7.0-11.module+el8.5.0+11015+9c1c7c42and 1 other package
- babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.4.0+403+9ae17a31
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.5.0+706+735ec4b3
- CythonRocky Linux:8all versions · fixed in 0:0.29.14-4.module+el8.4.0+570+c2eaf144
531 more package ranges on OSV.dev
Vendor advisories
python: mailcap: findmatch() function does not sanitize the second argument
python3 as a component of Red Hat Enterprise Linux 7 · python3-debug as a component of Red Hat Enterprise Linux 7 · python3-devel as a component of Red Hat Enterprise Linux 7 · +9 more
Siemens SIMATIC S7-1500
SIMATIC 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) · +2 more
SSA-398330: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP >= V3.1.0 and < V3.1.5
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.0 < V3.1.5 · +2 more
Red Hat Security Advisory: python3.9 security, bug fix, and enhancement update
Red Hat Security Advisory: python27:2.7 security update
Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update
3 more advisories
Fix
- Update Python to 3.10.8
- Vendor fix CISA ICSA-23-348-10 · 5 productsUpdate to V3.1.5 or later version
- Vendor fix Siemens ProductCERT SSA-398330 · 1 productUpdate to V3.1.5 or later version
- Vendor fix Red Hat Product Security RHSA-2022:8353 · 67 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- Workaround from the vendor Red Hat Product Security RHSA-2022:8353 · 67 productsUsers 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.
- Mitigation from the vendor CISA ICSA-23-348-10 · 5 productsOnly build and run applications from trusted sources.
- No fix planned, says the vendor Red Hat Product Security CVE-2015-20107 · 8 productsOut of support scope
Advisories and patches
- bugs.python.orgVendor Advisory
- python-security.readthedocs.ioPatch
Detection
read 2026-11-01 01:02 UTC- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHub1 repository, unverifiedknown since 2026-11-01codeskipper/python-patrol
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2026-10-07
- CISA-ADPCVSS 3.17.82026-10-07
- NVDCVSS 3.17.6read 2026-10-23
- NVDCVSS 2.08read 2026-10-23
- CISA-ADPweakness (CWE)CWE-772026-10-07
- NVDweakness (CWE)CWE-77read 2026-10-23
- FIRST EPSSEPSS score2.8 %2026-11-08
- PoC-in-GitHubproof of concept1known since 2026-11-01
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-84293same flawAzure Linux · MIT
- AZL-9417same flawAzure Linux · MIT
- EUVD-2015-2111same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-wvcr-2gc8-63ggsame flawGitHub Advisory Database · CC-BY-4.0
- ALSA-2022:6457advisory covering several CVEsAlmaLinux · MIT
- ALSA-2022:7581advisory covering several CVEsAlmaLinux · MIT
- ALSA-2022:7592advisory covering several CVEsAlmaLinux · MIT
- ALSA-2022:7593advisory covering several CVEsAlmaLinux · MIT
- ALSA-2022:8353advisory covering several CVEsAlmaLinux · MIT
- DLA-3432-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-3477-1advisory covering several CVEsDebian · LicenseRef-unstated
- DLA-3980-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2022-0359advisory covering several CVEsMageia · LicenseRef-unstated
- MGASA-2022-0367advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2022-1653advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2024:12143-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:12150-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:12152-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2022:6457advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:6766advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:7581advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:7592advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:7593advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:8353advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2022:7581advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2022:7592advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2022:7593advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2022:8353advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2022:2147-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2166-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2174-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2248-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2249-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2291-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2344-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2351-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2357-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:2357-2advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2023:0707-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2023:0748-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-5519-1advisory covering several CVEsUbuntu
- USN-5888-1advisory covering several CVEsUbuntu
- USN-6891-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L
- Published
- 2022-04-13
- Last Modified
- 2026-10-14
- NVD status
- Modified
- GitHub Advisory
- GHSA-wvcr-2gc8-63gg
Frequently asked questions
What is CVE-2015-20107?
Is CVE-2015-20107 actively exploited?
What is the CVSS score for CVE-2015-20107?
Running Python? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CISA ICS advisories (CSAF) · Public domain (US Government work)
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-wvcr-2gc8-63gg
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- Siemens ProductCERT (CSAF) · TLP:WHITE (commercial use and redistribution granted)
- CISA Vulnrichment · CC0-1.0