aiosmtplib — security advisory
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.
- Products
- aiosmtplib
- Affected versions
- 2.0.0-1, 3.0.1-1, 3.0.2-1, 3.0.2-2, 4.0.0-1, 4.0.1-1, 4.0.1-1~exp1, 4.0.2-1, 5.0.0-1, 5.1.0-1, 5.1.0-2, 5.1.0-3, 5.1.2-1, 5.1.3-1
- Fixed versions
- 5.1.2-1
- CVEs
- CVE-2026-55558
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 23:03 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2026-55558
aiosmtplib
Fixed versions: Not specified
aiosmtplib
Fixed versions: Not specified
aiosmtplib
Fixed versions: 5.1.2-1
Complete source record
{
"id": "b6ca7c71665c65a77371bc7f484c7dd1d333dbab1edd0b25abcd584a6d7d5555",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-55558",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-55558",
"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.",
"evidence": "osv:DEBIAN-CVE-2026-55558",
"products": [
{
"name": {
"value": "aiosmtplib",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.0.0-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.0.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.0.2-1",
"evidence": "/affected/0/versions"
},
{
"value": "3.0.2-2",
"evidence": "/affected/0/versions"
},
{
"value": "4.0.0-1",
"evidence": "/affected/0/versions"
},
{
"value": "4.0.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "4.0.1-1~exp1",
"evidence": "/affected/0/versions"
},
{
"value": "4.0.2-1",
"evidence": "/affected/0/versions"
},
{
"value": "5.0.0-1",
"evidence": "/affected/0/versions"
},
{
"value": "5.1.0-1",
"evidence": "/affected/0/versions"
},
{
"value": "5.1.0-2",
"evidence": "/affected/0/versions"
},
{
"value": "5.1.0-3",
"evidence": "/affected/0/versions"
},
{
"value": "5.1.2-1",
"evidence": "/affected/0/versions"
},
{
"value": "5.1.3-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "aiosmtplib",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.0.0-1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.1-1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.1-1~exp1",
"evidence": "/affected/1/versions"
},
{
"value": "4.0.2-1",
"evidence": "/affected/1/versions"
},
{
"value": "5.0.0-1",
"evidence": "/affected/1/versions"
},
{
"value": "5.1.0-1",
"evidence": "/affected/1/versions"
},
{
"value": "5.1.0-2",
"evidence": "/affected/1/versions"
},
{
"value": "5.1.0-3",
"evidence": "/affected/1/versions"
},
{
"value": "5.1.2-1",
"evidence": "/affected/1/versions"
},
{
"value": "5.1.3-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "aiosmtplib",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.1.2-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": [
{
"value": "4.0.0-1",
"evidence": "/affected/2/versions"
},
{
"value": "4.0.1-1",
"evidence": "/affected/2/versions"
},
{
"value": "4.0.1-1~exp1",
"evidence": "/affected/2/versions"
},
{
"value": "4.0.2-1",
"evidence": "/affected/2/versions"
},
{
"value": "5.0.0-1",
"evidence": "/affected/2/versions"
},
{
"value": "5.1.0-1",
"evidence": "/affected/2/versions"
},
{
"value": "5.1.0-2",
"evidence": "/affected/2/versions"
},
{
"value": "5.1.0-3",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2026-55558",
"aliases": [
"DEBIAN-CVE-2026-55558"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "aiosmtplib",
"purl": "pkg:deb/debian/aiosmtplib?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"versions": [
"2.0.0-1",
"3.0.1-1",
"3.0.2-1",
"3.0.2-2",
"4.0.0-1",
"4.0.1-1",
"4.0.1-1~exp1",
"4.0.2-1",
"5.0.0-1",
"5.1.0-1",
"5.1.0-2",
"5.1.0-3",
"5.1.2-1",
"5.1.3-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-55558.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "aiosmtplib",
"purl": "pkg:deb/debian/aiosmtplib?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"4.0.0-1",
"4.0.1-1",
"4.0.1-1~exp1",
"4.0.2-1",
"5.0.0-1",
"5.1.0-1",
"5.1.0-2",
"5.1.0-3",
"5.1.2-1",
"5.1.3-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-55558.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.1.2-1"
}
]
}
],
"package": {
"name": "aiosmtplib",
"purl": "pkg:deb/debian/aiosmtplib?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"4.0.0-1",
"4.0.1-1",
"4.0.1-1~exp1",
"4.0.2-1",
"5.0.0-1",
"5.1.0-1",
"5.1.0-2",
"5.1.0-3"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-55558.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-23T17:47:33.543831675Z",
"provider": "osv",
"upstream": [
"CVE-2026-55558"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-55558"
]
},
"related_cves": [
{
"value": "CVE-2026-55558",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 417614,
"published_at": "2026-08-20T15:17:31.98+00:00"
}