Intel

AIKIDO-2026-11095

aiosmtplib is vulnerable to Command Injection

Command InjectionGHSA-v3q9-hj7j-63hq Published Today

69

Medium Risk

This Affects:

PYTHONaiosmtplib
0.0.1 - 5.1.0
Fixed in 5.1.1
Are you affected? Scan for Free

TL;DR

The SMTP protocol layer writes caller-supplied envelope addresses from mail(), rcpt(), vrfy(), expn(), and sendmail() directly onto the control connection without rejecting embedded C0 control characters or DEL. An attacker who can influence those address strings can inject additional SMTP command lines such as RCPT TO or DATA, smuggling a full transaction or desynchronizing the client session. The patch validates all command arguments in execute_command() and raises ValueError before any bytes are sent.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

aiosmtplib is vulnerable to Command Injection in versions 0.0.1 - 5.1.0.

How to fix this

Upgrade the aiosmtplib library to the patch version.