Cloudanix VulnDB

CVE-2024-34083

Medium · 5.4

CVSS

5.4

EPSS

0.2%

Published

May 18, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in certain email server software could let someone on the same network secretly insert commands after encryption starts, potentially reading or altering messages.

Exploitation
Adjacent Network
Attacker needs
Other
Complexity
Moderate
Impact
Data Exposure
Component
Library
Class
Cryptographic Weakness
Remediation
Upgrade
Effort
Low
Patch risk
Low

What it actually does

The library fails to enforce TLS boundaries after STARTTLS, allowing subsequent commands to be processed in plaintext and accepted as originating from the encrypted session.

Why it matters to the business

Organizations running aiosmtpd-based SMTP services on shared or untrusted networks face risk of command injection or data exposure via local network interception until the package is updated.

How an attack unfolds

An on-path attacker intercepts the SMTP session, permits the STARTTLS handshake, then injects additional SMTP commands that the server erroneously treats as protected, enabling unauthorized actions such as message manipulation or credential capture.

How to fix it

Upgrade aiosmtpd to the commit f40ac96bfa6a77b593492939049729f46d141767 or later release containing the STARTTLS boundary fix; redeploy all affected services and verify the updated package is active.

How to confirm the fix worked

Confirm the running aiosmtpd version reports the patched commit; perform a controlled test that sends commands after STARTTLS and verifies they are rejected rather than processed.

Typical attack path

  1. Position as network adversary between client and aiosmtpd server
  2. Allow initial plaintext SMTP negotiation and STARTTLS exchange
  3. Inject additional SMTP commands immediately after the TLS upgrade
  4. Server processes injected commands as if they arrived inside the encrypted channel
  5. Attacker observes responses or achieves command execution without client-visible alerts

How to detect it

Search SMTP server logs for sequences of commands appearing immediately after STARTTLS acknowledgments that would normally be invalid in plaintext; correlate with network flow data showing unexpected intermediaries.

What your security team should do

  • Immediately schedule upgrade of all aiosmtpd instances to the patched commit
  • Restrict SMTP listener exposure to trusted networks until patches are applied
  • Review SMTP logs for anomalous post-STARTTLS command sequences during the exposure window
  • Add the package to automated dependency-update pipelines to prevent recurrence

The record

aiosmptd is a reimplementation of the Python stdlib smtpd.py based on asyncio. Prior to version 1.4.6, servers based on aiosmtpd accept extra unencrypted commands after STARTTLS, treating them as if they came from inside the encrypted connection. This could be exploited by a man-in-the-middle attack. Version 1.4.6 contains a patch for the issue.

Affected packages

Ecosystem Package Introduced Fixed
PyPI aiosmtpd 0 1.4.6
Debian:11 python-aiosmtpd 0 1.2.2-1+deb11u1
Debian:12 python-aiosmtpd 0 1.4.3-1.1+deb12u1
Debian:13 python-aiosmtpd 0 1.4.6-1
SUSE:Package Hub 15 SP5 python-aiosmtpd 0 1.2.1-bp155.3.3.1
Ubuntu:18.04:LTS python-aiosmtpd 0 No fix
Ubuntu:20.04:LTS python-aiosmtpd 0 No fix
Ubuntu:22.04:LTS python-aiosmtpd 0 No fix
Ubuntu:24.04:LTS python-aiosmtpd 0 No fix
Ubuntu:24.10 python-aiosmtpd 0 No fix
Ubuntu:25.04 python-aiosmtpd 0 No fix
Ubuntu:25.10 python-aiosmtpd 0 No fix
Ubuntu:Pro:18.04:LTS python-aiosmtpd 0 No fix
Ubuntu:Pro:20.04:LTS python-aiosmtpd 0 No fix
openSUSE:Leap 15.5 python-aiosmtpd 0 1.2.1-bp155.3.3.1

Related vulnerabilities