CVE-2015-20107

HIGH

Python < 3.7.15 - Command Injection via mailcap Module

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2015-20107. PoCs published by codeskipper.

AI-analyzed exploit summary This repository contains a scanner script to check if a Python installation is vulnerable to CVE-2015-20107, a command injection vulnerability in the mailcap module. The script tests for the presence of a warning when processing unquoted mailcap paths, indicating whether the patch is applied.

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

Exploits (1)

nomisec SCANNER
by codeskipper · poc
https://github.com/codeskipper/python-patrol

This repository contains a scanner script to check if a Python installation is vulnerable to CVE-2015-20107, a command injection vulnerability in the mailcap module. The script tests for the presence of a warning when processing unquoted mailcap paths, indicating whether the patch is applied.

Classification
Scanner 100%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: Python (versions affected by CVE-2015-20107)
No auth needed
Prerequisites: Access to the target system to run the script · Python environment to execute the scanner
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (30)

Core 30
Core References
Third Party Advisory vendor-advisory
https://security.gentoo.org/glsa/202305-02
Exploit, Issue Tracking, Vendor Advisory
https://bugs.python.org/issue24778
Issue Tracking, Third Party Advisory
https://github.com/python/cpython/issues/68966

Scores

CVSS v3 7.6
EPSS 0.0670
EPSS Percentile 93.1%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L

Details

CWE
CWE-77
Status published
Products (7)
fedoraproject/fedora 35
fedoraproject/fedora 36
fedoraproject/fedora 37
netapp/active_iq_unified_manager (2 CPE variants)
netapp/ontap_select_deploy_administration_utility
netapp/snapcenter
python/python 3.7.0 - 3.7.15
Published Apr 13, 2022
Tracked Since Feb 18, 2026