aiosmtplib: SMTP command injection via CR/LF in sender/recipient address
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- None · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-77.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| cole | aiosmtplib | before 5.1.1 | 5.1.1 | Patch available | CNA |
| — | aiosmtplib (PyPI) | before 5.1.1 | 5.1.1 | Patch available | GHSA-v3q9-hj7j-63hq |
- aiosmtplib Vendorcole Affected before 5.1.1 Fixed in 5.1.1 Patch available CNA
- aiosmtplib (PyPI) Vendor— Affected before 5.1.1 Fixed in 5.1.1 Patch available GHSA-v3q9-hj7j-63hq
Remediation
- Fix · CNA aiosmtplib (cole) Fixed in 5.1.1
- Fix · GHSA-v3q9-hj7j-63hq aiosmtplib (PyPI) Fixed in 5.1.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-53533
- 2026-10-03 Alias added: GHSA-v3q9-hj7j-63hq
References
More cole vulnerabilities
- TI-2026-61498 aiosmtplib before 5.1.3 ESMTP Parameter Injection via unvalidated addresses CVSS 4.0MEDIUM 6.3
- TI-2026-40102 aiosmtplib: STARTTLS response injection CVSS 3.1MEDIUM 5.9
Sources
- CVE-2026-53533 · CVE Program
- CVE-2026-53533 · NVD
- FIRST EPSS
- GHSA-v3q9-hj7j-63hq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences