aiosmtplib: STARTTLS response injection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| cole | aiosmtplib | before 5.1.2 | 5.1.2 | Patch available | CNA |
| — | aiosmtplib (PyPI) | before 5.1.2 | 5.1.2 | Patch available | GHSA-vxj7-4xrp-5vr4 |
- aiosmtplib Vendorcole Affected before 5.1.2 Fixed in 5.1.2 Patch available CNA
- aiosmtplib (PyPI) Vendor— Affected before 5.1.2 Fixed in 5.1.2 Patch available GHSA-vxj7-4xrp-5vr4
Remediation
- Fix · CNA aiosmtplib (cole) Fixed in 5.1.2
- Fix · GHSA-vxj7-4xrp-5vr4 aiosmtplib (PyPI) Fixed in 5.1.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-55558
- 2026-10-03 Alias added: GHSA-vxj7-4xrp-5vr4
References
More cole vulnerabilities
- TI-2026-38606 aiosmtplib: SMTP command injection via CR/LF in sender/recipient address CVSS 4.0MEDIUM 6.9
- TI-2026-61498 aiosmtplib before 5.1.3 ESMTP Parameter Injection via unvalidated addresses CVSS 4.0MEDIUM 6.3
Sources
- CVE-2026-55558 · CVE Program
- CVE-2026-55558 · NVD
- FIRST EPSS
- GHSA-vxj7-4xrp-5vr4 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences