CVE-2026-115559
JSON

6.3medium

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

Severity
6.3medium CVSS:4.0 by PSF
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
PSF
Also known as
BIT-LIBPYTHON-2026-115559BIT-PYTHON-2026-115559BIT-PYTHON-MIN-2026-115559

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

Product or packageVersionsReported by
Python Software Foundation CPythonbefore 3.16.0CVE List
libpython (Bitnami)before 3.16.0Bitnami Vulnerability Database
python (Bitnami)before 3.16.0Bitnami Vulnerability Database
python-min (Bitnami)before 3.16.0Bitnami Vulnerability Database

All scores

PSF6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Bitnami Vulnerability Databasemedium rating

Classification

CWE-319

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-115559 changed 2026-11-16CVE Terms of Use
NVDCVE-2026-115559 changed 2026-11-16Public domain
Bitnami Vulnerability DatabaseBIT-LIBPYTHON-2026-115559 changed 2026-11-27Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-2026-115559 changed 2026-11-27Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-MIN-2026-115559 changed 2026-11-27Apache-2.0