
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-115559 is a STARTTLS command/response injection vulnerability in Python's imaplib module (CPython) that allows a network attacker to inject forged IMAP server responses into the post-handshake encrypted channel. The root cause is that IMAP4.starttls() wraps the socket in TLS but does not clear self._readbuf (the library's internal read-ahead buffer), allowing plaintext bytes received alongside the server's OK response to STARTTLS to be returned by readline() after the TLS handshake completes. All CPython versions before 3.16.0 are affected. The vulnerability was reported on October 22, 2026, patched and merged on November 10, 2026, and published the same day. It carries a CVSS v4.0 base score of 6.3 (Medium) (Feedly, CPython PR).
The vulnerability is classified as CWE-319 (Cleartext Transmission of Sensitive Information) and is analogous to the STARTTLS injection class described in CVE-2011-0411. When a Python IMAP client sends a STARTTLS command, the server's OK response and any attacker-appended forged lines may arrive in the same TCP segment and be buffered in self._readbuf before the TLS handshake begins. Because IMAP4.starttls() does not flush or validate this buffer, the forged lines are subsequently returned by readline() as if they were TLS-protected server responses — allowing injection of fake CAPABILITY announcements or forged tagged command completions. Additionally, untagged_responses must also be discarded, as noted during code review (CPython PR, CPython Issue). Exploitation requires the attacker to be a network-positioned adversary (man-in-the-middle) capable of injecting bytes into the TCP stream before TLS is established, but does not require breaking TLS or possessing a valid certificate (Feedly).
A successful attacker can cause an IMAP client using Python's imaplib to accept forged server responses — including fabricated CAPABILITY lists and spoofed tagged command completions — as legitimate TLS-protected messages. This primarily affects integrity: the client may be deceived about server capabilities or believe a command (such as LOGIN) succeeded or failed based on attacker-controlled data. While confidentiality and availability impacts are rated as none, the injection could facilitate authentication bypass or manipulation of client behavior in applications relying on imaplib for secure email access (Feedly, CPython PR).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of publication (Feedly). The EPSS score is approximately 0.287%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires a network-positioned attacker capable of injecting bytes into the TCP stream between the IMAP client and server prior to TLS negotiation, making opportunistic mass exploitation unlikely. No threat actor attribution has been reported.
STARTTLS command and the server's tagged OK response (e.g., A001 OK Begin TLS negotiation now).OK response bytes, inject additional plaintext IMAP response lines (e.g., a forged * CAPABILITY IMAP4rev1 AUTH=PLAIN or a forged tagged response like A002 OK LOGIN completed) into the same TCP segment or a closely following one, before the TLS handshake bytes begin.self._readbuf.readline() returns the attacker-injected lines as if they were TLS-protected server responses, potentially causing the client to accept false capability advertisements or believe a subsequent command completed successfully (Feedly, CPython PR).OK response, prior to the TLS ClientHello; unusual IMAP capability strings (e.g., advertising unsupported AUTH mechanisms) observed in client-side logs.CAPABILITY responses or command completions immediately after STARTTLS negotiation; IMAP client errors or unexpected authentication outcomes that do not match server-side records.imaplib that report unexpected server capabilities or premature command completions after STARTTLS; anomalous behavior in email clients or automation scripts relying on imaplib for IMAP access.The fix is to upgrade CPython to version 3.16.0 or later, where IMAP4.starttls() now raises an abort exception if any data is found in self._readbuf after the STARTTLS OK response, and also discards untagged_responses before completing the TLS handshake (CPython PR). Backports have been initiated for CPython 3.11, 3.12, 3.13, 3.14, and 3.15 branches; users on these versions should apply the relevant backport patches when available. As a workaround where upgrading is not immediately possible, consider using IMAP over implicit TLS (port 993) instead of STARTTLS, which avoids the plaintext upgrade negotiation entirely (Feedly).
The vulnerability was discussed on the oss-security mailing list shortly after disclosure (oss-sec). The Python Security Announce mailing list published an advisory (Python Security Announce). The issue was flagged as a release-blocker by CPython maintainer Seth Michael Larson, reflecting the Python core team's prioritization of the fix for inclusion in the 3.16.0 alpha 2 release. Community reaction on Bluesky noted the similarity to the long-standing CVE-2011-0411 class of STARTTLS injection bugs (Bluesky). Tenable published a Nessus detection plugin (ID 380016) for the vulnerability (Tenable).
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
python3.7
bionic (esm-infra)
python2.7
devel
python3.14
focal (esm-apps)
python2.7
focal (esm-infra)
python3.8
jammy
python2.7
jammy (esm-apps)
python2.7
noble
python3.12
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."