CVE-2026-42256: Ruby Net::IMAP computational DoS in SCRAM authentication

CVE-2026-42256 · Severity: medium · CVSS 6.5 · Published 2026-05-09

Net::IMAP is a Ruby library used by applications to communicate with email servers. A vulnerability exists where a malicious or compromised email server can send a specially crafted response during the login process that forces the client application to perform excessive calculations. This can cause the application to become unresponsive or crash, leading to a denial of service for the user or system relying on the email connection.

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

Quick answers

Is CVE-2026-42256 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-42256 being exploited in the wild.
How severe is CVE-2026-42256?
Medium severity, with a CVSS score of 6.5, 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-42256?
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-42256 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-42256?
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 computational denial-of-service (DoS) vulnerability exists in the Net::IMAP library for Ruby when using SCRAM-SHA1 or SCRAM-SHA256 authentication. The root cause is the lack of a limit on the iteration count provided by the server during the SASL SCRAM exchange, leading to excessive CPU consumption in the client process (CWE-770, CWE-1322). An attacker controlling a hostile IMAP server can trigger this by sending a very large iteration count value in the server-first-message. The issue is addressed by introducing a configurable `max_iterations` setting in the `ScramAuthenticator`. Patches are available in versions 0.4.24, 0.5.14, and 0.6.4.

Affected products

  • Ruby Net::IMAP 0.4.0 to < 0.4.24, 0.5.0 to < 0.5.14, 0.6.0 to < 0.6.4

Identifiers

  • CVE-2026-42256
  • GHSA-87pf-fpwv-p7m7

Timeline

  • 2026-05-09: disclosed
  • 2026-05-09: advisory
  • 2026-04-23: patched: Release of versions 0.4.24, 0.5.14, and 0.6.4

References

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