CVE-2026-53533: cole aiosmtplib SMTP command injection in sender and recipient addresses

CVE-2026-53533 · Severity: medium · CVSS 4 · Published 2026-07-07

aiosmtplib is a Python library used by applications to send emails asynchronously. A vulnerability exists where an attacker can inject malicious commands into email sender or recipient fields. This could allow an attacker to send unauthorized emails or cause the application to stop responding, potentially disrupting communication services.

Technologies: aiosmtplib (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-53533 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-53533 being exploited in the wild.
How severe is CVE-2026-53533?
Medium severity, with a CVSS score of 4, published 7 July 2026.
Which products and versions are affected?
aiosmtplib (PyPI) <= 5.1.0, ECOSYSTEM:introduced=0,fixed=5.1.1.
Is there a fix for CVE-2026-53533?
Yes. aiosmtplib (PyPI): upgrade to 5.1.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-53533 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-53533?
Check whether you run aiosmtplib (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • aiosmtplib (PyPI): upgrade to 5.1.1 or later
    pip install "aiosmtplib>=5.1.1"

Technical details

The aiosmtplib library fails to properly neutralize CR/LF (\r\n) sequences in arguments passed to SMTP methods including mail(), rcpt(), vrfy(), and expn(). When these methods receive an address containing CR/LF, the library writes the sequence verbatim to the SMTP control connection, allowing an attacker to 'smuggle' additional SMTP commands (such as DATA or AUTH) that the server will execute as standalone instructions. This can lead to the desynchronization of the command/response pipeline, causing the client to hang (DoS) or allowing the delivery of unauthorized messages. The vulnerability is present in version 5.1.0 and earlier; it is fixed in version 5.1.1.

Affected products

  • cole aiosmtplib <= 5.1.0

Identifiers

  • CVE-2026-53533
  • GHSA-v3q9-hj7j-63hq
  • PYSEC-2026-2338

Timeline

  • 2026-05-31: disclosed
  • 2026-07-07: advisory: GitHub Advisory published
  • 2026-07-07: patched: Version 5.1.1 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.