← CVE Intelligence

CVE-2026-42246

net-imap vulnerable to STARTTLS stripping via invalid response timing PUBLISHED

Description (CNA)

Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to versions 0.3.10, 0.4.24, 0.5.14, and 0.6.4, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS. This issue has been patched in versions 0.3.10, 0.4.24, 0.5.14, and 0.6.4.

Affected (CNA)

Vendor / productVersions
ruby / net-imapaffected < 0.3.10; affected >= 0.4.0, < 0.4.24; affected >= 0.5.0, < 0.5.14; affected >= 0.6.0, < 0.6.4

CWE

CWE-392, CWE-393, CWE-754, CWE-636, CWE-841

References

ADP enrichment

CISA-ADP

No English description supplied.

No references supplied.

redhat-SADP

A flaw was found in the Ruby net-imap library. When upgrading a cleartext IMAP connection to TLS using the Net::IMAP#starttls method, the library improperly handles certain responses received during STARTTLS negotiation. A man-in-the-middle (MITM) attacker can inject a predicted tagged OK response before the client completes the STARTTLS command, causing the operation to appear successful without establishing a TLS session. As a result, the connection may continue to transmit sensitive information in cleartext and enable modification of data exchanged over the affected connection, while the application incorrectly believes that encryption has been enabled.