Critical Man-in-the-Middle Vulnerability in aiosmtpd Package

python-aiosmtpd Updated 02 Oct 2025

Summary

18/05/2024
N/A
Yes i
Unrated
Not published

CVE-2024-34083: aiosmptd is a reimplementation of the Python stdlib smtpd.py based on asyncio. Affects python-aiosmtpd across 2 version ranges.

< 1.2.2-1+deb11u1 < b3a4a2c6ecfd228856a20d637dc383541fcdbfda

Fixed in 1.2.2-1+deb11u1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

aiosmtpd is a reimplementation of the Python standard library's smtpd.py, designed to work with asyncio for asynchronous network programming. It allows developers to create SMTP servers that can handle email sending and receiving in a non-blocking manner. However, prior to version 1.4.6, aiosmtpd had a significant security flaw that allowed unencrypted commands to be accepted after a STARTTLS command, potentially exposing sensitive data to attackers.

Vulnerability Detail

The vulnerability, identified as CVE-2024-34083, arises from the handling of commands after the STARTTLS command in aiosmtpd versions prior to 1.4.6. When a server accepts extra unencrypted commands post-STARTTLS, it mistakenly treats them as if they originated from within an encrypted connection. This flaw can be exploited through a man-in-the-middle attack, where an attacker intercepts and manipulates the communication between the client and server, leading to potential data breaches and unauthorized access.

How To Fix

Minimum fixed version

1.2.2-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-aiosmtpd

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, if upgrading is not immediately feasible, consider disabling STARTTLS in your SMTP server configuration until the package can be updated. This will prevent the acceptance of unencrypted commands but may reduce the overall security of email transmission.

Conclusion

The aiosmtpd package has a critical vulnerability that can be exploited through man-in-the-middle attacks, allowing unauthorized access to sensitive data. It is crucial to upgrade to the patched versions to mitigate this risk. Users can also utilize Vulert to monitor and alert for such vulnerabilities in their software.

See every vulnerability recorded for python-aiosmtpd →

Share this vulnerability

FAQ

CVE-2024-34083 is a vulnerability in the aiosmtpd package that allows unencrypted commands to be accepted after a STARTTLS command, posing a risk of man-in-the-middle attacks.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized access to sensitive data, as attackers can intercept and manipulate communications between the client and server.

Versions of aiosmtpd prior to 1.4.6 are affected by this vulnerability, with specific fixes available in versions 1.2.2-1+deb11u1, 1.4.3-1.1+deb12u1, and 1.4.6-1.

If an immediate upgrade is not possible, consider disabling STARTTLS in your SMTP server configuration as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for python-aiosmtpd.

How To Fix

Minimum fixed version

1.2.2-1+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-aiosmtpd

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback