Loading advisory.
Loading advisory.
net-imap vulnerable to STARTTLS stripping via invalid response timing
A man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Published 2026-05-04 22:01 UTC · Modified 2026-09-10 03:50 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| net-imap | RubyGems | >= 0.6.0, < 0.6.4 >= 0.5.0, < 0.5.14 >= 0.4.0, < 0.4.24 < 0.3.10 versions 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.5.0, 0.5.1, 0.5.10, 0.5.11, 0.5.12, 0.5.13, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.4.0, 0.4.1 and 42 more | 0.6.4, 0.5.14, 0.4.24, 0.3.10 | gem install net-imap -v 0.6.4gem install net-imap -v 0.5.14gem install net-imap -v 0.4.24gem install net-imap -v 0.3.10 |
A man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
When using Net::IMAP#starttls to upgrade a plaintext connection to use TLS, a man-in-the-middle attacker can inject a tagged OK response with an easily predictable tag. By sending the response before the client finishes sending the command, the command completes "successfully" before the response handler is registered. This allows #starttls to return without error, but the response handler is never invoked, the TLS connection is never established, and the socket remains unencrypted.
This allows man-in-the-middle attackers to perform a STARTTLS stripping attack, unless the client code explicitly checks Net::IMAP#tls_verified?.
TLS bypass, leading to cleartext transmission of sensitive information.
Upgrade to a patched version of net-imap that raises an exception whenever #starttls does not establish TLS.
Connect to an implicit TLS port, rather than use STARTTLS with a cleartext port.
This is strongly recommended anyway:
RFC 8314: Cleartext Considered Obsolete: Use of Transport Layer Security (TLS) for Email Submission and Access
NO STARTTLS: Why TLS is better without STARTTLS, A Security Analysis of STARTTLS in the Email Context
Explicitly verify Net::IMAP#tls_verified? is true, before using the connection after #starttls.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.003 on 2026-11-24 to 0.004 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.003 | first score | v2026.06.15 |
| 2026-11-26 | 0.004 | 0.003 | v2026.06.15 |