CVE-2025-15366
Vulnerability Summary
Timeline
Description
The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.
CVSS Metrics
- v4.0•MEDIUM•Score: 5.9CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
- v4.0•MEDIUM•Score: 5.9CVSS: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
- v3.1•HIGH•Score: 7.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
EPSS Trends
Current EPSS score: 0.42%• Percentile: 36%
Techniques & Countermeasures
- CWE-77•Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Affected Systems
- alpine•python3
< 3.14.7-r0
- chainguard•python-3.10
all
- chainguard•python-3.11
all
- chainguard•python-3.12
all
- chainguard•python-3.13
< 3.13.15-r0
- chainguard•python-3.14
< 3.14.7-r0
- chainguard•python-3.9
all
- wolfi•python-3.10
all
- wolfi•python-3.11
all
- wolfi•python-3.12
all
- wolfi•python-3.13
< 3.13.15-r0
- wolfi•python-3.14
< 3.14.7-r0
- debian•jython
all | all | all | all
- debian•pypy3
all | all | all | all
- debian•python2.7
all
- debian•python3.11
all
- debian•python3.13
all | all
- debian•python3.14
all
- debian•python3.9
all
- ubuntu•python2.7
all | all
- ubuntu•python3.10
all
- ubuntu•python3.11
all
- ubuntu•python3.12
all
- ubuntu•python3.13
all
- ubuntu•python3.14
all
- ubuntu•python3.4
all
- ubuntu•python3.5
all
- ubuntu•python3.6
all
- ubuntu•python3.7
all
- ubuntu•python3.8
all
- ubuntu•python3.9
all
- python software foundation•cpython
< 3.15.0 | < 3.15.0a6 | < 3.13.15 | ≥ 3.14.0, < 3.14.7 | ≥ 3.15.0a1, < 3.15.0a6
- redhat•python3.13
< 0:3.13.12-2.hum1
References (24)
- 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://github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45
- https://github.com/python/cpython/commit/d0921efb665aff26b378f495e5ff84f7e3fe649d
- https://github.com/python/cpython/commit/f2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a
- https://github.com/python/cpython/commit/298182272a740ce2016aee2f54acbd0bba1944c1
- https://github.com/python/cpython/commit/71926d943c05bde79bd2a866933103541d91b6a2
- https://access.redhat.com/errata/RHSA-2026:5979
- https://images.redhat.com/
- https://access.redhat.com/security/cve/CVE-2025-15366
- https://access.redhat.com/security/updates/classification/
- https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_5979.json
- https://bugzilla.redhat.com/show_bug.cgi?id=2431368
- https://www.cve.org/CVERecord?id=CVE-2025-15366
- https://nvd.nist.gov/vuln/detail/CVE-2025-15366
- https://ubuntu.com/security/CVE-2025-15366
- https://ubuntu.com/security/notices/USN-8018-1
- https://ubuntu.com/security/notices/USN-8018-2
- https://bugs.launchpad.net/bugs/2143706
- https://security-tracker.debian.org/tracker/CVE-2025-15366
- https://security.alpinelinux.org/vuln/CVE-2025-15366
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/15xxx/CVE-2025-15366.json
- https://github.com/python/cpython