---
title: "CVE-2015-20107\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2015-20107?format=md
keywords: index, follow
---

# CVE-2015-20107

Publication date 13 April 2022

Last updated 25 August 2025

---

Ubuntu priority

**Low**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**7.6 · High**

[Score breakdown](https://ubuntu.com/security/CVE-2015-20107?format=md#impact-score)

Toggle side navigation

## 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

[Read the notes from the security team](https://ubuntu.com/security/CVE-2015-20107?format=md#notes)

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| python2.7 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Fixed 2.7.18-13ubuntu2 |
| 22.04 LTS jammy | Fixed 2.7.18-13ubuntu1.1 |
| 21.10 impish | Fixed 2.7.18-8ubuntu0.2 |
| 20.04 LTS focal | Fixed 2.7.18-1~20.04.3 |
| 18.04 LTS bionic | Fixed 2.7.17-1~18.04ubuntu1.8 |
| 16.04 LTS xenial | Fixed 2.7.12-1ubuntu0~16.04.18+esm2  Ubuntu Pro |
| 14.04 LTS trusty | Fixed 2.7.6-8ubuntu0.6+esm11  Ubuntu Pro |
| python3.10 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not affected |
| 22.04 LTS jammy | Fixed 3.10.4-3ubuntu0.1 |
| 21.10 impish | Ignored end of life |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |
| python3.4 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Fixed 3.4.3-1ubuntu1~14.04.7+esm13  Ubuntu Pro |
| python3.5 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Fixed 3.5.2-2ubuntu0~16.04.13+esm3  Ubuntu Pro |
| 14.04 LTS trusty | Fixed 3.5.2-2ubuntu0~16.04.4~14.04.1+esm1  Ubuntu Pro |
| python3.6 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Fixed 3.6.9-1~18.04ubuntu1.8 |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |
| python3.7 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 20.04 LTS focal | Not in release |
| 18.04 LTS bionic | Fixed 3.7.5-2ubuntu1~18.04.2+esm3  Ubuntu Pro |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |
| python3.8 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Not in release |
| 20.04 LTS focal | Fixed 3.8.10-0ubuntu1~20.04.5 |
| 18.04 LTS bionic | Fixed 3.8.0-3ubuntu1~18.04.2+esm2  Ubuntu Pro |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |
| python3.9 | 25.04 plucky | Not in release |
| 24.10 oracular | Not in release |
| 24.04 LTS noble | Not in release |
| 23.10 mantic | Not in release |
| 23.04 lunar | Not in release |
| 22.10 kinetic | Not in release |
| 22.04 LTS jammy | Not in release |
| 21.10 impish | Fixed 3.9.7-2ubuntu0.1 |
| 20.04 LTS focal | Fixed 3.9.5-3ubuntu0~20.04.1+esm1  Ubuntu Pro |
| 18.04 LTS bionic | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)

### Get expanded security coverage with Ubuntu Pro

Reduce your average CVE exposure time from 98 days to 1 day with expanded CVE patching, ten-years security maintenance and optional support for the full stack of open-source applications. Free for personal use.

[Get Ubuntu Pro](https://ubuntu.com/pro)
[30-day free trial](https://ubuntu.com/pro/free-trial)

## Notes

---

### [leosilva](https://launchpad.net/~leosilva)

patch was proposed in cpython Lib/mailcap.py but not merged yet.
it sounds a better approach was PR to fix that issue, but still
not merged yet.
there are plenty of discussions going on about proper ways to fix
that issue, but none was accept yet that fix the issue and keep
the software working properly.

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

7.6 · High

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Privileges required | Low |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | Low |
  | Integrity impact | High |
  | Availability impact | Low |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 7.6 · High |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-20107)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2015-20107)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2015-20107)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2015-20107)

### Related Ubuntu Security Notices (USN)

+ [USN-5519-1](https://usn.ubuntu.com/USN-5519-1)
+ Python vulnerability
+ 14 July 2022

+ [USN-5888-1](https://usn.ubuntu.com/USN-5888-1)
+ Python vulnerabilities
+ 27 February 2023

+ [USN-6891-1](https://usn.ubuntu.com/USN-6891-1)
+ Python vulnerabilities
+ 11 July 2024

### Other references

* <https://mail.python.org/archives/list/security-announce@python.org/thread/QDSXNCW77UGULFG2JMDFZQ7H4DIR32LA/>
* <https://github.com/python/cpython/pull/91542/commits/340251550897cb98ae83ad1040750d6300112e80>
* <https://github.com/python/cpython/pull/91993>
* <https://github.com/python/cpython/pull/98191>
* <https://www.cve.org/CVERecord?id=CVE-2015-20107>
