(aiosmtplib is an asynchronous SMTP client for use with asyncio. (CVE-2026-53533)
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.
AI Analysis
Technical Summary
The asynchronous SMTP client library aiosmtplib before version 5.1.1 fails to sanitize caller-supplied email addresses in SMTP.mail(), SMTP.rcpt(), SMTP.vrfy(), and SMTP.expn() methods, allowing embedded CR/LF characters. These characters enable injection of additional SMTP commands such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH. This injection can disrupt normal SMTP communication, cause client hangs, or send arbitrary messages without requiring control over the SMTP server. The SMTP.sendmail() and SMTP.send() methods that do not use a Message object are affected, while SMTP.send_message() is not. The issue is resolved in version 5.1.1.
Potential Impact
An attacker who can influence the envelope sender or recipient address can inject arbitrary SMTP commands, potentially causing the SMTP client to hang, desynchronize communication, or send unauthorized messages. This could disrupt email sending functionality and allow message spoofing or unauthorized email transmission. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade aiosmtplib to version 5.1.1 or later, where input validation rejects embedded CR and LF characters in sender and recipient addresses, preventing SMTP command injection. No additional mitigation is required once the upgrade is applied.
(aiosmtplib is an asynchronous SMTP client for use with asyncio. (CVE-2026-53533)
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.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The asynchronous SMTP client library aiosmtplib before version 5.1.1 fails to sanitize caller-supplied email addresses in SMTP.mail(), SMTP.rcpt(), SMTP.vrfy(), and SMTP.expn() methods, allowing embedded CR/LF characters. These characters enable injection of additional SMTP commands such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH. This injection can disrupt normal SMTP communication, cause client hangs, or send arbitrary messages without requiring control over the SMTP server. The SMTP.sendmail() and SMTP.send() methods that do not use a Message object are affected, while SMTP.send_message() is not. The issue is resolved in version 5.1.1.
Potential Impact
An attacker who can influence the envelope sender or recipient address can inject arbitrary SMTP commands, potentially causing the SMTP client to hang, desynchronize communication, or send unauthorized messages. This could disrupt email sending functionality and allow message spoofing or unauthorized email transmission. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade aiosmtplib to version 5.1.1 or later, where input validation rejects embedded CR and LF characters in sender and recipient addresses, preventing SMTP command injection. No additional mitigation is required once the upgrade is applied.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-v3q9-hj7j-63hq
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-53533"]
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a4e4ee7c9d9e3dbe3289b59
Added to database: 07/08/2026, 13:21:43 UTC
Last enriched: 08/19/2026, 11:16:09 UTC
Last updated: 09/14/2026, 11:16:54 UTC
Views: 135
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.