CVE-2026-42256: net-imap Denial of Service via High Iteration Count in SCRAM Authentication

net-imap Updated 05 May 2026

Summary

04/05/2026
Yes i
Moderate
6.0

CVE-2026-42256: net-imap vulnerable to denial of service via high iteration count for SCRAM-* authentication. Affects net-imap across 3 version ranges.

>= 0.4.0, < 0.4.24 >= 0.5.0, < 0.5.14 >= 0.6.0, < 0.6.4

Fixed in 0.4.24, 0.5.14 or 0.6.4, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The net-imap package is a Ruby library that provides a client interface for the Internet Message Access Protocol (IMAP), allowing users to interact with email servers. It supports various authentication mechanisms, including SCRAM-SHA1 and SCRAM-SHA256. The package is widely used for email applications and services that require secure and efficient email retrieval. However, it is vulnerable to a denial-of-service attack when a hostile server sends a large iteration count during SCRAM authentication, potentially freezing the Ruby VM.

Vulnerability Detail

The vulnerability arises when an IMAP server sends an excessively large PBKDF2 iteration count in the SCRAM server-first-message. This causes the client to execute a resource-intensive OpenSSL::KDF.pbkdf2_hmac call, which is a blocking operation. As a result, the entire Ruby VM can become unresponsive for an extended period, depending on the hardware and OpenSSL version. This vulnerability is recognized in RFC 7804 as a potential denial-of-service attack vector, emphasizing the need for client implementations to enforce maximum iteration counts.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.4.0, < 0.4.24 0.4.24
    gem install net-imap -v 0.4.24
  • >= 0.5.0, < 0.5.14 0.5.14
    gem install net-imap -v 0.5.14
  • >= 0.6.0, < 0.6.4 0.6.4
    gem install net-imap -v 0.6.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, avoid using SCRAM authentication mechanisms when connecting to untrusted IMAP servers. This can help prevent potential denial-of-service attacks until the package is updated.

Conclusion

The net-imap package is vulnerable to a denial-of-service attack via high iteration counts in SCRAM authentication. Users are advised to upgrade to the latest patched versions and implement safe maximum iteration counts to mitigate this risk. Temporary workarounds include avoiding SCRAM mechanisms with untrusted servers.

See every vulnerability recorded for net-imap →

Share this vulnerability

FAQ

The vulnerability allows a hostile server to send a large iteration count during SCRAM authentication, causing a denial-of-service condition by freezing the Ruby VM.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The patched versions of net-imap are 0.6.4, 0.5.14, and 0.4.24 or later.

If you cannot upgrade immediately, avoid using SCRAM authentication with untrusted servers as a temporary workaround.

The CVSS score of this vulnerability is 6.0, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for net-imap.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.4.0, < 0.4.24 0.4.24
    gem install net-imap -v 0.4.24
  • >= 0.5.0, < 0.5.14 0.5.14
    gem install net-imap -v 0.5.14
  • >= 0.6.0, < 0.6.4 0.6.4
    gem install net-imap -v 0.6.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback