{"id":"CVE-2025-15366","state":"PUBLISHED","title":"IMAP command injection in user-controlled commands","description":"The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.","publishedAt":"2026-01-20T21:40:24.938Z","updatedAt":"2026-08-06T00:37:36.230Z","severity":{"score":5.9,"label":"Medium","version":"4.0","vector":"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","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.13.15","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.7","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0a6","versionType":"python"}],"modules":["imaplib"],"repo":"https://github.com/python/cpython"}],"references":["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"],"weaknesses":["CWE-77"],"ingestedAt":"2026-10-29T20:08:31.050Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/15xxx/CVE-2025-15366.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-15366","state":"PUBLISHED","datePublished":"2026-01-20T21:40:24.938Z","dateUpdated":"2026-08-06T00:37:36.230Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2025-12-30T16:06:41.731Z"},"containers":{"cna":{"title":"IMAP command injection in user-controlled commands","descriptions":[{"lang":"en","value":"The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters."}],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.13.15","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.7","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0a6","versionType":"python"}],"modules":["imaplib"],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://github.com/python/cpython/issues/143921","tags":["issue-tracking"]},{"url":"https://github.com/python/cpython/pull/143922","tags":["patch"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/DD7C7JZJYTBXMDOWKCEIEBJLBRU64OMR/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/commit/6262704b134db2a4ba12e85ecfbd968534f28b45","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/d0921efb665aff26b378f495e5ff84f7e3fe649d","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/f2cd7ef89aa8a0dcbc7283bbd39548b76f2a736a","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/298182272a740ce2016aee2f54acbd0bba1944c1","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/71926d943c05bde79bd2a866933103541d91b6a2","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":5.9,"baseSeverity":"MEDIUM","exploitMaturity":"NOT_DEFINED","privilegesRequired":"HIGH","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-77","description":"CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-08-06T00:37:36.230Z"},"credits":[{"lang":"en","type":"reporter","value":"Omar M. Hasan"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.5.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-15366","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-01-22T04:55:32.252111Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-02-26T14:44:41.682Z"}}]}}}