BIT-python-min-2025-15367: POP3 command injection in user-controlled commands
The poplib 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 POP3 commands containing newlines or other control characters before passing them to the poplib module.
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Applications using Python's poplib module are exposed when they pass user-controlled input as a POP3 command. Deployments that do not allow untrusted input to determine commands are not described as affected by this behavior.
What access does an attacker need?
The supplied vector indicates network reachability, low attack complexity, no user interaction, and high privileges required. It also indicates that an additional attack requirement is present, but the available data does not specify what that requirement is.
What can be done if the mitigation cannot be applied immediately?
Do not pass user-controlled values directly as POP3 commands. Validate or reject input containing control characters, including newlines, before it reaches poplib command handling.