CVE-2024-27305: Aiosmtpd Aiosmtpd Vulnerable To SMTP Smuggling Vulnerability

MODERATE
Advisory Identifier: GHSA-pr2m-px7j-xg65
CVSS 5.3
CWE-345
Published
Advisory Summary

CVE-2024-27305 is a MODERATE (CVSS 5.3) aiosmtpd vulnerable to smtp smuggling vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Aiosmtpd libraries in the PyPI ecosystem. The issue involves aiosmtpd vulnerable to smtp smuggling. Remediation is available by upgrading affected packages to version 1.4.5.

CVE-2024-27305 at a Glance

CVE Identifier CVE-2024-27305
GHSA Identifier GHSA-pr2m-px7j-xg65
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Aiosmtpd
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-27305

To remediate this vulnerability, upgrade all affected Aiosmtpd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

aiosmtpd fixed: 1.4.5
pip install aiosmtpd>=1.4.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show aiosmtpd

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-27305, inspect your installed packages using pip:

pip show aiosmtpd

Analyze the terminal output to locate any version of Aiosmtpd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.5), your application is affected.

Note: The pip show aiosmtpd command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Aiosmtpd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary aiosmtpd is vulnerable to inbound SMTP smuggling. SMTP smuggling is a novel vulnerability based on not so novel interpretation differences of the SMTP protocol. By exploiting SMTP smuggling, an attacker may send smuggle/spoof e-mails with fake sender addresses, allowing advanced phishing attacks. This issue also existed in other SMTP software like Postfix (https://www.postfix.org/smtp-smuggling.html). ### Details Detailed information on SMTP smuggling can be found in the full blog post (https://sec-consult.com/blog/detail/smtp-smuggling-spoofing-e-mails-worldwide/) or on the Postfix homepage (https://www.postfix.org/smtp-smuggling.html). (and soon on the official website https://smtpsmuggling.com/) ### Impact With the right SMTP server constellation, an attacker can send spoofed e-mails to inbound/receiving aiosmtpd instances.

CVE-2024-27305 Affected Aiosmtpd Versions

1 component(s)
Fixed Versions:
1.4.5
Product / Package Ecosystem Affected Versions Fixed Version
aiosmtpd
PyPI
< 1.4.5
1.4.5

References

Frequently Asked Questions

What is CVE-2024-27305?
CVE-2024-27305 is a security vulnerability in Aiosmtpd involving aiosmtpd vulnerable to SMTP smuggling under CWE-345: Insufficient Verification of Data Authenticity.
Which Aiosmtpd versions are affected?
Affected versions include releases prior to 1.4.5 across affected packages: aiosmtpd.
What version fixes CVE-2024-27305?
Upgrading to 1.4.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is aiosmtpd affected?
Yes, aiosmtpd is affected in releases prior to 1.4.5. Upgrade your dependency to 1.4.5 or later.
What is the CVSS score of CVE-2024-27305?
CVE-2024-27305 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2024-27305?
CVE-2024-27305 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check PyPI dependencies for CVE-2024-27305?
Run the dependency tree command: 'pip show aiosmtpd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pr2m-px7j-xg65",
  "modified" : "2025-01-22T18:45:42Z",
  "published" : "2024-03-13T15:33:14Z",
  "aliases" : [ "CVE-2024-27305" ],
  "summary" : "aiosmtpd vulnerable to SMTP smuggling",
  "details" : "### Summary\naiosmtpd is vulnerable to inbound SMTP smuggling. SMTP smuggling is a novel vulnerability based on not so novel interpretation differences of the SMTP protocol. By exploiting SMTP smuggling, an attacker may send smuggle/spoof e-mails with fake sender addresses, allowing advanced phishing attacks. This issue also existed in other SMTP software like Postfix (https://www.postfix.org/smtp-smuggling.html).\n\n### Details\nDetailed information on SMTP smuggling can be found in the full blog post (https://sec-consult.com/blog/detail/smtp-smuggling-spoofing-e-mails-worldwide/) or on the Postfix homepage (https://www.postfix.org/smtp-smuggling.html). (and soon on the official website https://smtpsmuggling.com/)  \n\n### Impact\nWith the right SMTP server constellation, an attacker can send spoofed e-mails to inbound/receiving aiosmtpd instances.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "aiosmtpd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aio-libs/aiosmtpd/security/advisories/GHSA-pr2m-px7j-xg65"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27305"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aio-libs/aiosmtpd/commit/24b6c79c8921cf1800e27ca144f4f37023982bbb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aio-libs/aiosmtpd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/aiosmtpd/PYSEC-2024-221.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://www.postfix.org/smtp-smuggling.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-13T15:33:14Z",
    "nvd_published_at" : "2024-03-12T21:15:58Z"
  }
}