Junglewise Threat Intelligence

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

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

Vendors: Ruby.

Executive brief

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.

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

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