CVE-2025-15366: Python Software Foundation CPython · Command Injection
Affects Python Software Foundation CPythonSource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium · fixed in 3.15.0a6 : update Python Software Foundation CPython when convenient.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 37% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.15.0a6, 3.14.7, 3.13.15
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 20 Jan 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Upgrade Python Software Foundation CPython to 3.15.0a6, 3.14.7 or 3.13.15.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Python Software FoundationCPython | Affected
| Fixed in
|
GitHubCPythonpkg:github/CPythonOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The known mitigation is to reject commands containing control characters to prevent injection.
Description
The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.
References
- github.com/python/cpython/issues/143921 (opens in a new tab)
- github.com/python/cpython/pull/143922 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/DD7C7JZJYTBXMDOWKCEIEBJLBRU64OMR/ (opens in a new tab)
- github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45 (opens in a new tab)
- github.com/python/cpython/commit/d0921efb665aff26b378f495e5ff84f7e3fe649d (opens in a new tab)
- github.com/python/cpython/commit/f2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a (opens in a new tab)
- github.com/python/cpython/commit/298182272a740ce2016aee2f54acbd0bba1944c1 (opens in a new tab)
- github.com/python/cpython/commit/71926d943c05bde79bd2a866933103541d91b6a2 (opens in a new tab)