BIT-python-2025-15366: IMAP command injection in user-controlled commands

Published Jan 20, 2026
·
Updated

The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.

Affected Software

1 affected component
Python Software Foundation Python imaplib

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Reject IMAP commands containing control characters, including newlines, before passing user-controlled commands to imaplib.

Event History

Jan 20, 2026
CVE Published
via OSV·09:40 PM
Data Sourced
via OSV·09:40 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using Python's imaplib are exposed when they pass user-controlled values as IMAP commands. The issue depends on untrusted command input reaching the module.

2

What does an attacker need to exploit it?

An attacker needs to influence an IMAP command supplied to imaplib and include newline/control characters to inject additional commands. The provided severity vector indicates network reachability, low attack complexity, and high privileges required.

3

What can be done if an update cannot be applied immediately?

Reject or sanitize user-controlled IMAP command values that contain control characters, including newlines. Do not allow untrusted input to determine IMAP commands.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203