CVE-2024-34083
Medium · 5.4CVSS
5.4
EPSS
0.2%
Published
May 18, 2024
CISA due date
—
Cloudanix analysis
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
- Position as network adversary between client and aiosmtpd server
- Allow initial plaintext SMTP negotiation and STARTTLS exchange
- Inject additional SMTP commands immediately after the TLS upgrade
- Server processes injected commands as if they arrived inside the encrypted channel
- 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
- CVE-2026-19033 For a secondary zone with transfers restricted by TSIG, `named` may start to serve the… CWE-349
- CVE-2026-78301 A malformed zone may contain an NS or DNAME node above its origin, which `named` treats… CWE-349
- CVE-2026-74916 The WP Fastest Cache WordPress plugin before 1.5.1 does not include a set of… CWE-349
- CVE-2026-15387 GitLab has remediated an issue in GitLab EE affecting all versions from 19.1 before… CWE-349
- CVE-2026-50252 In NLnet Labs Unbound 1.4.22 up to and including 1.25.1, UDP source port is randomized… CWE-349
- CVE-2026-41120 Dell Wyse Management Suite, versions prior to WMS 5.5 HF1, contain an Acceptance of… CWE-349
- CVE-2026-33612 A malicious authoritative server can send a crafted zone via the ZoneToCache function… CWE-349
- CVE-2026-46342 Nuxt is an open-source web development framework for Vue.js. CWE-349