CVE-2025-15366
Command Injection via Newline in Python imaplib Module
Publication date: 2026-01-20
Last updated on: 2026-01-20
Assigner: Python Software Foundation
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| python | imaplib | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-77 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The vulnerability in the imaplib module allows an attacker to inject additional commands by including newlines in a user-controlled command. This means that if an attacker can control the input to imaplib, they can potentially execute unintended commands. The mitigation involves rejecting commands that contain control characters to prevent this injection.
How can this vulnerability impact me? :
This vulnerability can allow an attacker with some level of access to inject additional commands into the imaplib module, potentially leading to unauthorized actions or manipulation of the IMAP session. This could compromise the integrity or behavior of the application using imaplib.
What immediate steps should I take to mitigate this vulnerability?
Mitigation involves rejecting commands containing control characters to prevent command injection via newlines in the imaplib module.