Description
aiosmtplib is an asynchronous SMTP client for use with asyncio. Prior to 5.1.1, SMTP.mail(), SMTP.rcpt(), SMTP.vrfy(), and SMTP.expn() send caller-supplied addresses without rejecting embedded CR or LF bytes. Data after the line break is framed as additional standalone SMTP command lines, allowing an attacker who influences an envelope sender or recipient to inject commands such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH. SMTP.sendmail() and SMTP.send() without a Message object pass addresses through the affected methods, while SMTP.send_message() is not affected. Successful injection can desynchronize the command-response pipeline, hang the SMTP instance, or send an arbitrary message without requiring attacker control of the SMTP server. This issue is fixed in version 5.1.1.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| cole | aiosmtplib | < 5.1.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | aiosmtplib | 5.1.2-1 | — |
| Debian 13 | aiosmtplib | No fix yet | — |
| Debian 12 | aiosmtplib | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | aiosmtplib | No fix yet | — |
| Ubuntu 26.04 LTS | aiosmtplib | No fix yet | — |
| Ubuntu 22.04 LTS | aiosmtplib | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-aiosmtplib | 5.1.1-1.1 | openSUSE-SU-2026:11035-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | aiosmtplib | < 5.1.1 | 5.1.1 | GHSA-v3q9-hj7j-63hq |
Advisories 1
- openSUSE-SU-2026:11035-1 python311-aiosmtplib-5.1.1-1.1 on GA media SUSE / openSUSE Security Updates · Jun 16, 2026