CVE-2026-115559: imaplib STARTTLS serves plaintext bytes buffered before the handshake as if they came over TLS

Published Nov 10, 2026
·
Updated

IMAP4.starttls() wraps the socket in TLS but leaves self.readbuf, imaplib's own read-ahead buffer, untouched. Any plaintext bytes that arrived in the same recv() as the tagged OK to STARTTLS are returned by readline() after the handshake, so the client treats them as the first responses on the protected channel. A network attacker who cannot break TLS can append forged lines after the server's OK, let the handshake complete with the real server and a valid certificate, and have the client accept the forged CAPABILITY and the forged tagged completion of the next command. This is the STARTTLS command/response injection class of CVE-2011-0411.

Affected Software

1 affected component
Python Software Foundation imaplib

Event History

Nov 10, 2026
CVE Published
via MITRE·06:39 PM
Data Sourced
via MITRE·06:39 PM
Description
Data Sourced
via NVD·07:19 PM
DescriptionSeverity

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