CVE-2026-55558aiosmtplib: STARTTLS response injection
aiosmtplib is an asynchronous SMTP client for use with asyncio. Prior to 5.1.2, SMTPProtocol.start_tls in src/aiosmtplib/protocol.py consumes the server's 220 response and starts the TLS handshake without clearing SMTPProtocol._buffer. An active network attacker can place attacker-chosen SMTP response lines after the plaintext 220 response in the same network segment. The method then calls loop.start_tls; those bytes survive the transport upgrade and are parsed as the first response from inside the TLS session, desynchronizing subsequent SMTP command and response pairs. Connections using start_tls=True or opportunistic STARTTLS are affected, while connections using use_tls=True are not. This issue is fixed in version 5.1.2.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | aiosmtplib | Fix pending | UBUNTU-CVE-2026-55558 | |
| Ubuntu 26.04 | aiosmtplib | Under investigation | UBUNTU-CVE-2026-55558 | |
| Ubuntu 22.04 | aiosmtplib | Under investigation | UBUNTU-CVE-2026-55558 | |
| Debian 14 | aiosmtplib | Fixed | 5.1.2-1 | DEBIAN-CVE-2026-55558 |
| Debian 13 | aiosmtplib | Fix pending | DEBIAN-CVE-2026-55558 | |
| Debian 12 | aiosmtplib | Fix pending | DEBIAN-CVE-2026-55558 | |
| PyPI library | aiosmtplib | Fixed | 5.1.2 | PYSEC-2026-3805 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- cole aiosmtplib: affected: < 5.1.2
References
- https://github.com/cole/aiosmtplib/security/advisories/GHSA-vxj7-4xrp-5vr4
- https://github.com/cole/aiosmtplib/commit/9fab7ba1361dbf7622ede1315a24be805cff09c9
- https://github.com/cole/aiosmtplib/releases/tag/v5.1.2
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.