BIT-python-min-2025-15366: IMAP command injection in user-controlled commands
The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Reject user-controlled IMAP commands that contain control characters, including newlines, to prevent additional commands from being injected.