Medium severity · published Jan 20, 2026
CVE-2025-15366
IMAP command injection in user-controlled commands
5.9
CVSS
0.4%
EPSS
No
On KEV
Description
The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 37% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CP
CPython · Python Software Foundation
before 3.13.15; 3.14.0 before 3.14.7; 3.15.0a1 before 3.15.0a6 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-15366
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-15366
github.com
https://github.com/python/cpython/commit/298182272a740ce2016aee2f54acbd0bba1944c1
github.com
https://github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45
github.com
https://github.com/python/cpython/commit/71926d943c05bde79bd2a866933103541d91b6a2
github.com
https://github.com/python/cpython/commit/d0921efb665aff26b378f495e5ff84f7e3fe649d
github.com
https://github.com/python/cpython/commit/f2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a
github.com
https://github.com/python/cpython/issues/143921
More from CPython
9.4
CVE-2026-115557
Distrust compromised intermediate certificates in ssl module
9.4
CVE-2025-4517
Arbitrary writes via tarfile realpath overflow
9.2
CVE-2026-19445
Use-after-free of a server-side SSLContext when sni_callback switches contexts
8.8
CVE-2026-3298
Out-of-bounds write in Windows asyncio.ProacterEventLoop.sock_recvfrom_into() when using nbytes
8.7
CVE-2024-8088
Infinite loop when iterating over zip archive entry names from zipfile.Path
