Skip to main content

MailKit CVE-2026-41319

| EUVDEUVD-2026-25388 MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-04-24 GitHub_M
5.9
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker gains network position
  2. Delivery
    Intercepts SMTP STARTTLS request
  3. Exploit
    Injects fake SASL capability response into buffer
  4. Execution
    Client processes injected response as post-TLS
  5. Persist
    SASL mechanism downgraded
  6. Impact
    Credentials transmitted via weak mechanism

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Man-in-the-middle network position capable of intercepting and modifying SMTP/IMAP/POP3 connections during STARTTLS negotiation is required. The attacker must operate on the network path between the MailKit client and the mail server before the TLS Finished message is processed. The target system must be running MailKit prior to version 4.16.0 and must initiate STARTTLS (not implicit TLS). The mail server must support at least two SASL mechanisms (otherwise no downgrade is possible); most modern servers support SCRAM-SHA-256 and PLAIN, making downgrade profitable. The attack is limited to the STARTTLS window (seconds to minutes per connection) and requires per-connection injection; it does not persist or affect subsequent secure sessions. Environments using implicit TLS (port 465/993/995) or air-gapped networks without MITM-capable adversaries are not vulnerable despite running affected MailKit versions.

Impact

CVSS 6.5 (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N) indicates network-exploitable integrity violation requiring user interaction but no privileges. The integrity impact is high due to authentication downgrade enabling credential interception via weaker SASL mechanisms. No EPSS score was provided in the intelligence data, limiting probabilistic exploitation assessment. The attack is not network-automated (AC:L and UI:R together mean the attacker needs network access AND the user must initiate a mail connection, not that the user clicks a link). Real-world exploitation requires three conditions: network position for MITM, target running MailKit pre-4.16.0, and mail client attempting STARTTLS-protected authentication. The vulnerability targets the TLS handshake window, a narrow but critical trust boundary. This is NOT a high-noise vulnerability affecting default installations at scale; it is a targeted protocol-downgrade attack against applications and users whose threat model includes active network attackers (corporate networks, public WiFi, nation-state actors). Organizations using MailKit in air-gapped environments face lower risk; those exposed to untrusted networks (mail sync over cellular, public WiFi clients) face higher risk. The patch is straightforward (buffer flush), supporting rapid remediation.

Exploit ScenarioDerived

An attacker on a shared corporate network or public WiFi intercepts a client's SMTP connection initiating STARTTLS. Before the TLS handshake completes, the attacker injects a fake SASL PLAIN response into the connection, followed by a fake 250 OK. When the client's MailKit library flushes and processes buffered responses post-TLS, it treats the injected data as server-authenticated, believing the server supports only PLAIN authentication. The client proceeds with PLAIN, transmitting credentials in a weakly obfuscated form (base64), allowing the attacker to extract them despite the TLS tunnel for the account handshake.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 24, 2026

STARTTLS response injection in MailKit prior to version 4.16.0 allows man-in-the-middle attackers to downgrade SASL authentication mechanisms by injecting malicious protocol responses before TLS negotiation completes. The vulnerability stems from failure to flush the internal read buffer when upgrading from plaintext to encrypted connections, enabling attackers to force weaker authentication (e.g., PLAIN instead of SCRAM-SHA-256) on affected SMTP, IMAP, and POP3 connections. User interaction is required (establishing a mail connection through the client), and exploitation requires network position to intercept and modify STARTTLS exchanges. Vendor-released patch version 4.16.0 addresses the issue.

RemediationAI

Upgrade MailKit to version 4.16.0 or later immediately. This is the primary and complete fix; the patch flushes the internal read buffer when transitioning from plaintext to TLS, eliminating the response injection window. Organizations unable to upgrade immediately should implement network-level mitigations: enforce HTTPS/TLS proxies for mail traffic, disable STARTTLS and require implicit TLS (port 465/993/995) instead, or restrict mail client usage to authenticated corporate networks with traffic inspection. These workarounds trade convenience (STARTTLS auto-upgrade) for security. The patch carries no known regressions and should be deployed as soon as possible, particularly for production mail systems handling sensitive authentication.

Affected VersionsENISA

MailKit < 4.16.0

Affected Packages

nuget mailkit fix: 4.16.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in nuget

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

MailKit is a .NET mail client library providing SMTP, IMAP, and POP3 protocol implementations. The vulnerability affects the protocol stream classes (SmtpStream, ImapStream, Pop3Stream) which maintain internal read buffers to parse server responses. During STARTTLS negotiation, these streams replace the underlying network stream with an SslStream to establish TLS encryption. The flaw occurs because data already buffered from the plaintext phase is not discarded before TLS wraps the connection. This violates the trust boundary assumption that post-STARTTLS responses originate from the authenticated server: an attacker positioned on the network can inject SASL capability advertisements or authentication challenge responses into the buffer before STARTTLS completes. When the application consumes buffered data after TLS activation, it treats attacker-controlled content as server-authenticated responses, enabling mechanism downgrade attacks. The root cause is improper state management during protocol upgrade (CWE-74: Improper Neutralization of Special Elements in Output).

Know when Mailkit gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

4
CVSS changed
Oct 26, 2026 - 22:25 NVD
6.5 (MEDIUM) 5.9 (MEDIUM)
Patch released
Apr 25, 2026 - 03:16 nvd
Patch available
Patch available
Apr 24, 2026 - 05:31 EUVD
CVE Published
Apr 24, 2026 - 03:07 nvd
MEDIUM 6.5

DescriptionNVD

MailKit is a cross-platform mail client library built on top of MimeKit. A STARTTLS Response Injection vulnerability in versions prior to 4.16.0 allows a Man-in-the-Middle attacker to inject arbitrary protocol responses across the plaintext-to-TLS trust boundary, enabling SASL authentication mechanism downgrade (e.g., forcing PLAIN instead of SCRAM-SHA-256). The internal read buffer in SmtpStream, ImapStream, and Pop3Stream is not flushed when the underlying stream is replaced with SslStream during STARTTLS upgrade, causing pre-TLS attacker-injected data to be processed as trusted post-TLS responses. Version 4.16.0 patches the issue.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy