CVE-2026-115559
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 package | Versions | Reported by |
|---|---|---|
| Python Software Foundation CPython | before 3.16.0 | CVE List |
| libpython (Bitnami) | before 3.16.0 | Bitnami Vulnerability Database |
| python (Bitnami) | before 3.16.0 | Bitnami Vulnerability Database |
| python-min (Bitnami) | before 3.16.0 | Bitnami Vulnerability Database |
All scores
| PSF | 6.3medium CVSS:4.0 | CVSS: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 Database | medium rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-115559 changed 2026-11-16 | CVE Terms of Use |
| NVD | CVE-2026-115559 changed 2026-11-16 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPYTHON-2026-115559 changed 2026-11-27 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-2026-115559 changed 2026-11-27 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-MIN-2026-115559 changed 2026-11-27 | Apache-2.0 |