Skip to main content

net-imap CVE-2026-42256

MEDIUM
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-05-04 https://github.com/ruby/net-imap GHSA-87pf-fpwv-p7m7
6.0
CVSS 4.0 · Vendor: https://github.com/ruby/net-imap
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Network connection to IMAP server
  2. Delivery
    Initiate SCRAM authentication
  3. Exploit
    Receive server-first-message with high iteration count
  4. Execution
    Call OpenSSL::KDF.pbkdf2_hmac with untrusted count
  5. Persist
    Lock entire Ruby VM
  6. Impact
    Deny service to application

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The vulnerability requires the application to initiate SCRAM-SHA1 or SCRAM-SHA256 authentication with an IMAP server. Exploitation depends on attacker control over or network interception of the IMAP server's responses. If the IMAP server requires TLS, the attacker must either compromise the server, perform a man-in-the-middle attack (requires breaking TLS), or the application must connect without certificate validation. The application must be running an unpatched version of net-imap (0.4.0-0.4.23, 0.5.0-0.5.13, or 0.6.0-0.6.3). Even patched versions remain vulnerable unless the application explicitly sets max_iterations to a protective value below the default 2³¹-1; the patch provides the mechanism but does not change the default unsafe maximum. No special configuration or non-standard IMAP features are required - standard SCRAM authentication during initial connection attempt is sufficient.

Impact

This is a high-impact denial of service vulnerability despite the absence of a CVSS score. The exploitation is straightforward and requires only network access to an IMAP server (AV:N), zero complexity to trigger (AC:L), and no authentication (PR:N), making it remotely exploitable by any attacker operating a malicious IMAP server or intercepting connections. The impact is severe: all Ruby threads in affected processes freeze completely for minutes, effectively halting any application using net-imap for IMAP authentication. Standard Ruby Timeout mechanisms cannot interrupt the blocking C call, and Ruby's threading model provides no protection. The vulnerability affects all three recent version lines (0.4.x, 0.5.x, 0.6.x), indicating wide exposure in the Ruby ecosystem. However, exploitation requires either a compromised IMAP server, man-in-the-middle capability, or victim misconfiguration to connect to attacker-controlled servers. The severity is partially mitigated by the fact that the default patched behavior (introduced in 0.4.24+, 0.5.14+, 0.6.4+) sets max_iterations to the maximum allowed value unless explicitly configured by users - meaning patched systems remain vulnerable unless developers actively set a protective limit. The real risk depends heavily on whether applications update AND configure the max_iterations parameter appropriately for their hardware and OpenSSL version.

Exploit ScenarioDerived

An attacker operates a malicious IMAP server or intercepts an unencrypted IMAP connection. A Ruby application connects and initiates SCRAM authentication. The attacker's server responds with a SCRAM server-first-message containing iterations=2147483647 (the maximum 32-bit signed integer). The client's net-imap library calls OpenSSL::KDF.pbkdf2_hmac with this iteration count, causing the Ruby VM to perform over 2 billion PBKDF2 rounds, completely freezing all application threads for 5-10+ minutes depending on processor speed and OpenSSL version. During this time, the application cannot handle requests, process other events, or respond to timeouts.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 04, 2026

Denial of service in net-imap SCRAM-SHA1/SHA256 authentication allows a hostile IMAP server to freeze the entire Ruby VM by sending an arbitrarily large PBKDF2 iteration count, blocking all threads for several minutes due to the blocking nature of OpenSSL::KDF.pbkdf2_hmac and its retention of the Global VM Lock. Patched versions 0.4.24, 0.5.14, and 0.6.4 introduce a max_iterations parameter that users must explicitly configure to prevent exploitation.

RemediationAI

Upgrade net-imap to patched version 0.4.24 (for 0.4.x), 0.5.14 (for 0.5.x), or 0.6.4 (for 0.6.x) available from https://github.com/ruby/net-imap/releases. Critically, after upgrading, applications must explicitly configure the max_iterations parameter when calling Net::IMAP#authenticate with SCRAM mechanisms. The default patched value (2³¹-1) does NOT prevent the attack; it is the user's responsibility to set max_iterations to a safe value appropriate for their hardware and OpenSSL version (RFC 7804 and OWASP guidance suggest 100,000-600,000 iterations for modern systems, though actual safe values depend on acceptable latency tolerance and processor speed). Example: Net::IMAP#authenticate(..., max_iterations: 100_000). As a workaround for unpatched systems, avoid using SCRAM-SHA1 or SCRAM-SHA256 mechanisms when connecting to untrusted or unverified IMAP servers; instead use other SASL mechanisms or enforce strict TLS certificate validation and server identity verification to reduce attack surface. Note: setting max_iterations too low may cause authentication to fail against legitimate servers with legitimate high iteration counts.

Affected Packages

rubygems net-imap fix: 0.4.24, 0.5.14, 0.6.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability exists in the SCRAM (Salted Challenge Response Authentication Mechanism) authenticators implemented by net-imap for IMAP protocol authentication. When a server sends a SCRAM server-first-message containing a PBKDF2 iteration count during SASL authentication, the client calls OpenSSL::KDF.pbkdf2_hmac with that count. PBKDF2 (Password-Based Key Derivation Function 2) is a legitimate cryptographic function that derives a key from a password through iterative hashing. However, because OpenSSL implements the iteration count as a 32-bit signed integer and PBKDF2 computation is blocking C code that holds Ruby's Global VM Lock, a malicious server can specify an extremely high iteration count (up to 2³¹-1, over 2 billion iterations) causing the client Ruby process to perform expensive cryptographic work that locks the entire VM. This is acknowledged in RFC 7804 as a known security consideration for SCRAM implementations. The root cause is CWE-770 (Allocation of Resources Without Limits or Throttling), where the client accepts unbounded resource consumption parameters from an untrusted server without validation.

Know when OpenSSL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/ruby/net-imap) PRIMARY 6.0 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Red Hat 6.5 MEDIUM

Primary rating from Vendor (https://github.com/ruby/net-imap).

CVSS VectorVendor: https://github.com/ruby/net-imap

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
May 09, 2026 - 20:22 NVD
6.0 (MEDIUM)

DescriptionCVE.org

Summary

When authenticating a connection with SCRAM-SHA1 or SCRAM-SHA256, a hostile server can perform a computational denial-of-service attack on the client process by sending a big iteration count value.

Details

A hostile IMAP server can send an arbitrarily large PBKDF2 iteration count in the SCRAM server-first-message, causing the client to perform an expensive OpenSSL::KDF.pbkdf2_hmac call. Because the PBKDF2 function is a blocking C extension and holds onto Ruby’s Global VM Lock, it can freeze the entire Ruby VM for the duration of the computation.

OpenSSL enforces an effective maximum by using a 32-bit signed integer for the iteration count, Depending on hardware capabilities and OpenSSL version, this iteration count may be sufficient for to block all Ruby threads in the process for over seven minutes.

This is listed as one of the "Security Considerations", in RFC 7804: > A hostile server can perform a computational denial-of-service attack on clients by sending a big iteration count value. In order to defend against that, a client implementation can pick a maximum iteration count that it is willing to use and reject any values that exceed that threshold (in such cases, the client, of course, has to fail the authentication).

Impact

During SCRAM authentication to a hostile server, the entire Ruby VM will be locked for the duration of the computation. Depending on hardware capabilities and OpenSSL version, this may take many minutes.

OpenSSL::KDF.pbkdf2_hmac is a blocking C function, so Timeout cannot be used to guard against this. And it retains the Global VM lock, so other ruby threads will also be unable to run.

Mitigation

  • Upgrade to a patched version of net-imap that adds the max_iterations option to the SASL-* authenticators, and call Net::IMAP#authenticate with a max_iterations keyword argument.

NOTE: The default max_iterations is 2³¹ - 1, the maximum signed 32 bit integer, the maximum allowed by OpenSSL. _To prevent a denial of service attack,_ this must be set to a safe value, depending on hardware and version of OpenSSL. _It is the user's responsibility_ to enforce minimum and maximum iteration counts that are appropriate for their security context.

  • Alternatively, avoid SCRAM-* mechanisms when authenticating to untrusted servers.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:rubygems/net-imap
pkg:rubygems/net-imap
pkg:rubygems/net-imap
CVE-2014-0160 HIGH POC
7.5 Apr 07

The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packe

CVE-2021-3711 CRITICAL POC
9.8 Aug 24

In order to decrypt SM2 encrypted data an application is expected to call the API function EVP_PKEY_decrypt(). Rated cri

CVE-2014-0195 MEDIUM POC
6.8 Jun 05

The dtls1_reassemble_fragment function in d1_both.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2016-0800 MEDIUM POC
5.9 Mar 01

The SSLv2 protocol, as used in OpenSSL before 1.0.1s and 1.0.2 before 1.0.2g and other products, requires a server to se

CVE-2015-0204 MEDIUM POC
4.3 Jan 09

The ssl3_get_key_exchange function in s3_clnt.c in OpenSSL before 0.9.8zd, 1.0.0 before 1.0.0p, and 1.0.1 before 1.0.1k

CVE-2022-2068 HIGH
7.3 Jun 21

In addition to the c_rehash shell command injection identified in CVE-2022-1292, further circumstances where the c_rehas

CVE-2015-4000 LOW POC
3.7 May 21

The TLS protocol 1.2 and earlier, when a DHE_EXPORT ciphersuite is enabled on a server but not on a client, does not pro

CVE-2014-3566 LOW POC
3.4 Oct 15

The SSL protocol 3.0, as used in OpenSSL through 1.0.1i and other products, uses nondeterministic CBC padding, which mak

CVE-2016-2107 MEDIUM POC
5.9 May 05

The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a

CVE-2015-1793 MEDIUM POC
6.5 Jul 09

The X509_verify_cert function in crypto/x509/x509_vfy.c in OpenSSL 1.0.1n, 1.0.1o, 1.0.2b, and 1.0.2c does not properly

CVE-2022-3602 HIGH
7.5 Nov 01

A buffer overrun can be triggered in X.509 certificate verification, specifically in name constraint checking. Rated hig

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 16.0 Fixed
SUSE Linux Enterprise High Availability Extension 16.1 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy