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.
Severity (CVSS)
| Base score | 6.9 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:H/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-77 — CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
- CWE-93 — CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| cole | aiosmtplib | < 5.1.1 |
References
- https://github.com/cole/aiosmtplib/security/advisories/GHSA-v3q9-hj7j-63hq (x_refsource_CONFIRM)
- https://github.com/cole/aiosmtplib/commit/8eaf6efc9a8f59e2e09d3ef11246a058c46bd3ba (x_refsource_MISC)
- https://github.com/cole/aiosmtplib/releases/tag/v5.1.1 (x_refsource_MISC)
Generated from the official CVE List on 19 Aug 2026 07:05 UTC.