Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. aiosmtplib
  4. ›
  5. CVE-2026-53533

CVE-2026-53533: aiosmtplib vulnerable to SMTP command injection via CR/LF in sender/recipient address

July 7, 2026

aiosmtplib’s SMTP.mail(), SMTP.rcpt(), SMTP.vrfy() and SMTP.expn() send the caller-supplied email address to the server without rejecting embedded CR/LF (\r\n) bytes. An address that contains a CR/LF is written verbatim onto the SMTP control connection, so the bytes after the CRLF are framed by the server as one or more additional, standalone SMTP command lines. A caller that passes an attacker-influenced sender or recipient address into mail()/rcpt() (or vrfy()/expn()) therefore allows SMTP command injection (CWE-93 / CWE-77): the attacker can smuggle arbitrary SMTP verbs such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH into the session. Injected commands will cause the SMTP instance to hang, but all commands required to complete the envelope could be sent in one address string.

The SMTP.sendmail() command will pass sender and recipient addresses verbatim through to SMTP.mail() & SMTP.rcpt(), and so is also vulnerable. SMTP.send_message() is not affected.

References

  • github.com/advisories/GHSA-v3q9-hj7j-63hq
  • github.com/cole/aiosmtplib/security/advisories/GHSA-v3q9-hj7j-63hq
  • nvd.nist.gov/vuln/detail/CVE-2026-53533

Code Behaviors & Features

Detect and mitigate CVE-2026-53533 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.1.1

Fixed versions

  • 5.1.1

Solution

Upgrade to version 5.1.1 or above.

Impact 9.3 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
  • CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')

Source file

pypi/aiosmtplib/CVE-2026-53533.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 13 Jul 2026 00:21:20 +0000.