
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2015-20107 affects Python (CPython) versions up to 3.10.8, where the mailcap module fails to properly add escape characters into commands discovered in the system mailcap file. The vulnerability was initially discovered on August 2, 2015, and was assigned a CVE identifier on April 13, 2022. The issue affects multiple Python versions including 2.7, 3.7, 3.8, 3.9, and 3.10 (Python Security).
The vulnerability exists in the mailcap.findmatch() function, which returns a command line that can be passed to os.system(). When processing filenames containing shell metacharacters, the function fails to properly escape these characters, potentially allowing command injection. The vulnerability has been assigned a CVSS v3.1 base score of 7.6 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L (NVD).
Successful exploitation of this vulnerability could allow attackers to inject shell commands into applications that call mailcap.findmatch with untrusted input, particularly when they lack validation of user-provided filenames or arguments. This could lead to disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS) (NetApp Advisory).
The vulnerability has been fixed in Python versions 3.7.16, 3.8.16, 3.9.16, 3.10.8, and 3.11.0. The fix prevents injection of ASCII characters other than alphanumerics and @+=:,./-_ into the returned command line. Users should upgrade to these or later versions. For systems that cannot be immediately upgraded, input validation should be implemented to sanitize filenames before passing them to mailcap.findmatch() (Python Security).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."