IMAP command injection in user-controlled commands
Summary
| CVE | CVE-2025-15366 |
|---|---|
| State | PUBLISHED |
| Assigner | PSF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-01-20 22:15:51 UTC |
| Updated | 2026-07-09 18:16:48 UTC |
| Description | The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters. |
Risk And Classification
Primary CVSS: v4.0 5.9 MEDIUM from [email protected]
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS: 0.003600000 probability, percentile 0.281320000 (date 2026-07-13)
Problem Types: CWE-77 | CWE-77 CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 5.9 | MEDIUM | 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/E:X/C... |
| 4.0 | CNA | CVSS | 5.9 | MEDIUM | 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 |
CVSS v4.0 Breakdown
Attack Vector
NetworkAttack Complexity
LowAttack Requirements
PresentPrivileges Required
HighUser Interaction
NoneConfidentiality
LowIntegrity
HighAvailability
NoneSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Python Software Foundation | CPython | affected 3.15.0a6 python | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/python/cpython/commit/298182272a740ce2016aee2f54acbd0bba1944c1 | [email protected] | github.com | |
| github.com/python/cpython/pull/143922 | [email protected] | github.com | |
| github.com/python/cpython/commit/f2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a | [email protected] | github.com | |
| github.com/python/cpython/commit/71926d943c05bde79bd2a866933103541d91b6a2 | [email protected] | github.com | |
| github.com/python/cpython/issues/143921 | [email protected] | github.com | |
| github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45 | [email protected] | github.com | |
| mail.python.org/archives/list/[email protected]/thread/DD7C7JZJYTB... | [email protected] | mail.python.org | |
| github.com/python/cpython/commit/d0921efb665aff26b378f495e5ff84f7e3fe649d | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Omar M. Hasan (en)
There are currently no legacy QID mappings associated with this CVE.