Skip to content
Heist/ feed
Back to feed
Medium

aiosmtplib: SMTP command injection via CR/LF in sender/recipient address

Type: advisorySources: OSV

aiosmtplib is an asynchronous SMTP client for use with asyncio. Prior to 5.1.1, SMTP.mail(), SMTP.rcpt(), SMTP.vrfy(), and SMTP.expn() send caller-supplied addresses without rejecting embedded CR or LF bytes. Data after the line break is framed as additional standalone SMTP command lines, allowing an attacker who influences an envelope sender or recipient to inject commands such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH. SMTP.sendmail() and SMTP.send() without a Message object pass addresses through the affected methods, while SMTP.send_message() is not affected. Successful injection can desynchronize the command-response pipeline, hang the SMTP instance, or send an arbitrary message without requiring attacker control of the SMTP server. This issue is fixed in version 5.1.1.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-53533
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 13:31 UTC · Revision 1

Source evidence

aiosmtplib: SMTP command injection via CR/LF in sender/recipient address

core-osv · Original source

Published 18 Aug 2026, 17:54 UTC

aiosmtplib is an asynchronous SMTP client for use with asyncio. Prior to 5.1.1, SMTP.mail(), SMTP.rcpt(), SMTP.vrfy(), and SMTP.expn() send caller-supplied addresses without rejecting embedded CR or LF bytes. Data after the line break is framed as additional standalone SMTP command lines, allowing an attacker who influences an envelope sender or recipient to inject commands such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH. SMTP.sendmail() and SMTP.send() without a Message object pass addresses through the affected methods, while SMTP.send_message() is not affected. Successful injection can desynchronize the command-response pipeline, hang the SMTP instance, or send an arbitrary message without requiring attacker control of the SMTP server. This issue is fixed in version 5.1.1.

osv:CVE-2026-53533
Complete source record
{
  "id": "f12ce6a55ef55974b0aa7c3d9d27157e43f88b7142fb3f6d5757a269111107f0",
  "url": "https://osv.dev/vulnerability/CVE-2026-53533",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "aiosmtplib: SMTP command injection via CR/LF in sender/recipient address",
    "summary": "aiosmtplib is an asynchronous SMTP client for use with asyncio. Prior to 5.1.1, SMTP.mail(), SMTP.rcpt(), SMTP.vrfy(), and SMTP.expn() send caller-supplied addresses without rejecting embedded CR or LF bytes. Data after the line break is framed as additional standalone SMTP command lines, allowing an attacker who influences an envelope sender or recipient to inject commands such as MAIL FROM, RCPT TO, RSET, DATA, or AUTH. SMTP.sendmail() and SMTP.send() without a Message object pass addresses through the affected methods, while SMTP.send_message() is not affected. Successful injection can desynchronize the command-response pipeline, hang the SMTP instance, or send an arbitrary message without requiring attacker control of the SMTP server. This issue is fixed in version 5.1.1.",
    "evidence": "osv:CVE-2026-53533",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-53533",
      "aliases": [
        "CVE-2026-53533",
        "GHSA-v3q9-hj7j-63hq",
        "PYSEC-2026-2338"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:H/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cole/aiosmtplib",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "b18d293c3f03debe40f572bb20647fc3596b9af5"
                },
                {
                  "fixed": "8eaf6efc9a8f59e2e09d3ef11246a058c46bd3ba"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "5.1.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8eaf6efc9a8f59e2e09d3ef11246a058c46bd3ba"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b18d293c3f03debe40f572bb20647fc3596b9af5"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v5.1.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v5.1.0",
            "v5.0.0",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.0.1",
            "v2.0.0.post0",
            "v2.0.0",
            "v2.0.0b1",
            "v2.0.0b0",
            "v1.1.7",
            "v1.1.6",
            "v1.1.5",
            "v1.1.5.dev0",
            "v1.1.4",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.1.0b0",
            "v1.0.4",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.1.7",
            "v0.1.6",
            "v0.1.5",
            "v0.1.4",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53533.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:50.734530038Z",
      "provider": "osv",
      "references": [
        "https://github.com/cole/aiosmtplib/releases/tag/v5.1.1",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53533.json",
        "https://github.com/cole/aiosmtplib/security/advisories/GHSA-v3q9-hj7j-63hq",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-53533",
        "https://github.com/cole/aiosmtplib/commit/8eaf6efc9a8f59e2e09d3ef11246a058c46bd3ba"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77",
          "CWE-93"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53533.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-53533",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 519463,
  "published_at": "2026-08-18T17:54:23.124+00:00"
}