MODERATE 6.3

CVE-2026-115559

imaplib STARTTLS serves plaintext bytes buffered before the handshake as if they came over TLS

Preliminary: affected artifacts were inferred from the fix commits of the source repository and have not been reviewed yet. They will be replaced by the reviewed advisory when it is published.

Description

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 Maven artifacts (1)

ArtifactAffected versionsFixed in
com.chaquo.python » pythonpreliminary
< 3.16.0
3.16.0

Blast radius

1affected artifacts
12affected versions
0dependent artifacts (est.)
0dependent versions

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.