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

> An active network attacker can inject SMTP responses during STARTTLS negotiation, desynchronizing the protocol state and potentially exposing or modifying data.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Aug 2026
- **Updated:** 20 Aug 2026
- **Also known as:** CLEANSTART-2026-DL97476, CLEANSTART-2026-DR99316, DEBIAN-CVE-2026-55558, ECHO-c2e7-d06a-81e1, GHSA-vxj7-4xrp-5vr4, MINI-46rm-9j23-2r54, MINI-cm8x-4qjv-w54h, PYSEC-2026-3805, UBUNTU-CVE-2026-55558, openSUSE-SU-2026:11569-1

## What is CVE-2026-55558?

CVE-2026-55558 is a medium-severity vulnerability in cole aiosmtplib, published on 20 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2026-55558?

3 open source packages ship an affected version, including aiosmtplib.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aiosmtplib` | PyPI | All versions | 5.1.2 |
| `aiosmtplib` | PyPI | All versions | 5.1.2 |
| `aiosmtplib` | PyPI | All versions | 5.1.2 |
| `python-aiosmtplib` | openSUSE:Tumbleweed | All versions | 5.1.2-1.1 |

## How do I fix CVE-2026-55558?

Upgrade aiosmtplib to 5.1.2 or later.

## Is CVE-2026-55558 being exploited?

There is no known exploitation of CVE-2026-55558 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-55558 and fix it if it is affected.

What it is: CVE-2026-55558 is a medium-severity vulnerability in cole aiosmtplib, published on 20 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-55558 in the wild and no public exploit code.

Affected packages and fixed versions:
- aiosmtplib (PyPI): affected all versions; fixed in 5.1.2
- aiosmtplib (PyPI): affected all versions; fixed in 5.1.2
- aiosmtplib (PyPI): affected all versions; fixed in 5.1.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-55558/ (Markdown: https://insights.sbomify.com/CVE-2026-55558/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-55558
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-55558
- OSV: https://osv.dev/vulnerability/CVE-2026-55558

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-55558/
Summaries are generated and may contain mistakes; the official description above is the record.
