{"id":"CVE-2026-55558","published":"2026-08-20T14:29:58Z","modified":"2026-08-20T20:00:21Z","title":"aiosmtplib: STARTTLS response injection","vendor":"cole","product":"aiosmtplib","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00403,"percentile":0.35414,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/cole/aiosmtplib/security/advisories/GHSA-vxj7-4xrp-5vr4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/cole/aiosmtplib/commit/9fab7ba1361dbf7622ede1315a24be805cff09c9","tags":["x_refsource_MISC"]},{"url":"https://github.com/cole/aiosmtplib/releases/tag/v5.1.2","tags":["x_refsource_MISC"]}],"priority":{"score":11.2,"factors":[{"name":"EPSS percentile","points":7.08},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"cole","affectedVersions":[{"vendor":"cole","product":"aiosmtplib","versions":["< 5.1.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-08-20T20:00:16.093023Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"aiosmtplib","vulnerableRanges":["<5.1.2"],"patched":["5.1.2"],"from":["GHSA-vxj7-4xrp-5vr4","PYSEC-2026-3805"],"provenance":"source"}],"summary":{"text":"The aiosmtplib asynchronous SMTP client, in versions before 5.1.2, fails to clear its buffered data when it upgrades a connection to TLS in SMTPProtocol.start_tls, so response bytes sent in plaintext before the handshake can carry over into the encrypted session. An attacker who can actively intercept traffic on the same network segment can inject crafted SMTP response lines after the plaintext 220 response, which desynchronize later command and response pairs; this affects connections using start_tls=True or opportunistic STARTTLS, but not those using use_tls=True.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:58:26Z"},"euvd":{"id":"EUVD-2026-63376","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-cole-aiosmtplib-cve-2026-53533","parents":[{"from":"CVE-2026-53533","to":"CVE-2026-55558","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:aiosmtplib","fromFixed":"5.1.1","toFixed":"5.1.2","daysApart":2},{"kind":"same-code","provenance":"machine","files":["src/aiosmtplib/protocol.py"],"commits":["https://github.com/cole/aiosmtplib/commit/8eaf6efc9a8f59e2e09d3ef11246a058c46bd3ba","https://github.com/cole/aiosmtplib/commit/9fab7ba1361dbf7622ede1315a24be805cff09c9"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.26,"basis":"same product + description similarity"}]}],"packageHistory":[{"cve":"CVE-2026-53533","published":"2026-08-18","fixed":"5.1.1","kev":false},{"cve":"CVE-2026-55558","published":"2026-08-20","fixed":"5.1.2","kev":false}],"package":"PyPI:aiosmtplib"}}