CVE-2025-15366
Medium
Description
The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.
SeverityMedium
CVSS5.9
Exploit probability—
ProductCPython
PublishedJan 20, 2026
First seenJan 20, 2026
Weakness typeCWE-77Command injection
How to fix
Update
- Python Software Foundation CPython3.13.15, 3.14.7, 3.15.0a6 or later
Patches
- github.com/python/cpython/pull/143922
- github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45
- github.com/python/cpython/commit/d0921efb665aff26b378f495e5ff84f7e3fe649d
- github.com/python/cpython/commit/f2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a
- github.com/python/cpython/commit/298182272a740ce2016aee2f54acbd0bba1944c1
- github.com/python/cpython/commit/71926d943c05bde79bd2a866933103541d91b6a2
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| Python Software Foundation CPython | v < 3.13.15, 3.14.0 ≤ v < 3.14.7, 3.15.0a1 ≤ v < 3.15.0a6 | 3.13.15, 3.14.7, 3.15.0a6 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
In the Intelligence 360 plan
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.