---
title: "CVE-2025-15366\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-2025-15366?format=md
keywords: index, follow
---

# CVE-2025-15366

Publication date 20 January 2026

Last updated 19 June 2026

---

Ubuntu priority

**Medium**

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

Toggle side navigation

## Description

The imaplib module, when passed a user-controlled command, can have
additional commands injected using newlines. Mitigation rejects commands
containing control characters.

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

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| python3.13 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Ignored end of life, was ignored [patch breaks RFC conformance] |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| python3.14 | 26.04 LTS resolute | Not affected |
| 25.10 questing | Ignored end of life, was ignored [patch breaks RFC conformance] |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| python2.7 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Ignored patch breaks RFC conformance |
| 20.04 LTS focal | Ignored patch breaks RFC conformance |
| 18.04 LTS bionic | Ignored patch breaks RFC conformance |
| 16.04 LTS xenial | Ignored end of ESM support, was ignored [patch breaks RFC conformance] |
| 14.04 LTS trusty | Ignored patch breaks RFC conformance |
| python3.10 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Ignored patch breaks RFC conformance |
| python3.11 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Ignored patch breaks RFC conformance |
| python3.12 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Ignored patch breaks RFC conformance |
| 22.04 LTS jammy | Not in release |
| python3.4 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| 14.04 LTS trusty | Ignored patch breaks RFC conformance |
| python3.5 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| 16.04 LTS xenial | Ignored end of ESM support, was ignored [patch breaks RFC conformance] |
| 14.04 LTS trusty | Ignored patch breaks RFC conformance |
| python3.6 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| 18.04 LTS bionic | Ignored patch breaks RFC conformance |
| python3.7 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| 18.04 LTS bionic | Ignored patch breaks RFC conformance |
| python3.8 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Ignored patch breaks RFC conformance |
| 18.04 LTS bionic | Ignored patch breaks RFC conformance |
| python3.9 | 26.04 LTS resolute | Not in release |
| 25.10 questing | Not in release |
| 24.04 LTS noble | Not in release |
| 22.04 LTS jammy | Not in release |
| 20.04 LTS focal | Ignored patch breaks RFC conformance |

---

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

## Notes

---

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

CVE patch breaks conformance with RFC 9051 - Internet Message Access Protocol (IMAP). Initial patch published in USN-8018-1 has been reverted. Python upstream also hasn't backported this patch to the upstream supported releases

## Severity score breakdown

CVSS version:
CVSS v4.0

**Base score**

5.9 · Medium

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Attack requirements | Present |
  | Privileges required | High |
  | User interaction | None |
  | Vulnerable system - Confidentiality impact | Low |
  | Vulnerable system - Integrity impact | High |
  | Vulnerable system - Availability impact | None |
  | Subsequent system - Confidentiality impact | None |
  | Subsequent system - Integrity impact | None |
  | Subsequent system - Availability impact | None |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 5.9 · Medium |
  | Base + Threat score | - |
  | Base + Environmental score | - |
  | Base + Threat + Environmental score | - |

**Vector:** CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N

## References

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

### Related Ubuntu Security Notices (USN)

+ [USN-8018-1](https://usn.ubuntu.com/USN-8018-1)
+ Python vulnerabilities
+ 5 February 2026

+ [USN-8018-2](https://usn.ubuntu.com/USN-8018-2)
+ Python regression
+ 9 March 2026

### Other references

* <https://www.cve.org/CVERecord?id=CVE-2025-15366>
* <https://github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45>
* <https://github.com/python/cpython/issues/143921>
* <https://github.com/python/cpython/pull/143922>
* <https://mail.python.org/archives/list/security-announce@python.org/thread/DD7C7JZJYTBXMDOWKCEIEBJLBRU64OMR/>
* <https://bugs.launchpad.net/bugs/2143706>
