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
- https://github.com/ruby/net-imap/commit/158d0b505074397cdb5ceb58935e42dd2bcfa612
- https://github.com/ruby/net-imap/commit/808001bc45c06f7297a7e96d341279e041a7f7f4
- https://github.com/ruby/net-imap/commit/99f59eab6064955a23debd95410263ad144df758
- https://github.com/ruby/net-imap/releases/tag/v0.4.24
- https://github.com/ruby/net-imap/releases/tag/v0.5.14
- https://github.com/ruby/net-imap/releases/tag/v0.6.4
- https://github.com/ruby/net-imap/security/advisories/GHSA-87pf-fpwv-p7m7