CVE-2025-15367: Python Software Foundation CPython · Command Injection
Affects Python Software Foundation CPythonSource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium : upgrade to 3.15.0a6 when convenient.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 31% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.15.0a6
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.
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
To mitigate CVE-2025-15367, organizations should first apply any official patches released by the Python Software Foundation once available. In the absence of patches, developers should implement strict input validation to reject or sanitize commands containing control characters, particularly newline characters, before passing them to the poplib module. Employing application-level sandboxing or running Python processes with the least privilege can reduce the impact of potential exploitation. Monitoring and logging usage of the poplib module for anomalous command patterns may help detect exploitation attempts. Additionally, consider isolating email processing components from critical systems to limit lateral movement. Regularly update Python environments to the latest versions to benefit from security fixes. Educate developers and administrators about secure coding practices related to command injection and input sanitization. Finally, conduct security assessments and code reviews focusing on modules handling external input to identify similar injection risks.
Description
The poplib 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/pull/143924 (opens in a new tab)
- github.com/python/cpython/issues/143923 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/CBFBOWVGGUJFSGITQCCBZS4GEYYZ7ZNE/ (opens in a new tab)
- github.com/python/cpython/commit/b234a2b67539f787e191d2ef19a7cbdce32874e7 (opens in a new tab)