CVE-2026-42246: Ruby Net::IMAP STARTTLS stripping vulnerability

CVE-2026-42246 · Severity: high · CVSS 7.4 · Published 2026-05-09

A security flaw in the Ruby Net::IMAP library, which handles email communication for Ruby applications, allows attackers to bypass encryption. By intercepting the connection, an attacker can trick the application into believing a secure connection has been established when it is actually sending data in plain text. This could lead to the theft of sensitive email content or login credentials.

Technologies: net-imap (RubyGems). Vendors: RubyGems.

Quick answers

Is CVE-2026-42246 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-42246 being exploited in the wild.
How severe is CVE-2026-42246?
High severity, with a CVSS score of 7.4, published 9 May 2026.
Which products and versions are affected?
net-imap (RubyGems) ECOSYSTEM:introduced=0.6.0,fixed=0.6.4.
Is there a fix for CVE-2026-42246?
Yes. net-imap (RubyGems): upgrade to 0.6.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-42246 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-42246?
Check whether you run net-imap (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • net-imap (RubyGems): upgrade to 0.6.4 or later
    bundle update net-imap

Technical details

A STARTTLS stripping vulnerability exists in the Ruby Net::IMAP library. The root cause is an improper check for unusual or exceptional conditions during the TLS handshake negotiation, specifically within the Net::IMAP#starttls method. A man-in-the-middle (MITM) attacker can intercept the communication and manipulate the server's response to make the client believe encryption was successfully initiated while the connection remains in plaintext. This allows the attacker to read or modify sensitive IMAP traffic. The issue is patched in versions 0.3.10, 0.4.24, 0.5.14, and 0.6.4.

Affected products

  • Ruby Net::IMAP < 0.3.10, 0.4.0 - 0.4.23, 0.5.0 - 0.5.13, 0.6.0 - 0.6.3

Identifiers

  • CVE-2026-42246
  • GHSA-vcgp-9326-pqcp

Timeline

  • 2026-05-09: advisory: Initial disclosure by GitHub, Inc.
  • 2026-04-23: patched: Patched versions released.

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.