Skip to content
OpenAdvisories
Medium · 6.5 CVE-2026-41319 EUVD-2026-25388GHSA-9j88-vvj5-vhgr

MailKit has STARTTLS Response Injection via unflushed stream buffer that enables SASL mechanism downgrade

Published Apr 24, 2026 · Updated Apr 25, 2026 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
jstedfast MailKit < 4.16.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
NuGet MailKit < 4.16.0 4.16.0 GHSA-9j88-vvj5-vhgr

References