Denial of Service Vulnerability in Net::IMAP of Ruby 3.3 - Memory Exhaustion Risk

ruby3.3 Updated 02 Oct 2025

Summary

10/02/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2025-25186: Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Affects ruby3.3 versions < 3.3.8-1. Fixed in 3.3.8-1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ruby 3.3 is a version of the Ruby programming language that includes various libraries and modules for building applications. One of these libraries is Net::IMAP, which implements Internet Message Access Protocol (IMAP) client functionality. This library allows Ruby applications to interact with email servers using the IMAP protocol. However, a vulnerability exists in versions prior to 3.3.8, where the response parser can be exploited to cause memory exhaustion, leading to a denial of service.

Vulnerability Detail

The vulnerability arises from the way Net::IMAP handles uid-set data sent by a malicious server. When connected to an IMAP server, the client can receive highly compressed uid-set data that is automatically processed by the receiver thread. The response parser uses Range#to_a to convert this uid-set data into arrays of integers without any limitation on the size of the ranges. This can lead to excessive memory consumption, potentially crashing the application or making it unresponsive. The affected versions are 0.3.2 and prior to 0.3.8, 0.4.19, and 0.5.6.

How To Fix

Minimum fixed version

3.3.8-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ruby3.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, consider limiting the connections to trusted IMAP servers only, or implement network-level controls to filter out potentially malicious responses. However, the best solution is to update to the patched version as soon as possible.

Conclusion

The vulnerability in Ruby 3.3's Net::IMAP library poses a significant risk of denial of service due to memory exhaustion. It is crucial for users to update to the latest patched version to ensure their applications remain secure. Utilizing tools like Vulert can aid in monitoring for such vulnerabilities effectively.

See every vulnerability recorded for ruby3.3 →

Share this vulnerability

FAQ

The vulnerability allows a malicious server to send specially crafted uid-set data that can exhaust memory resources, leading to a denial of service.

Versions 0.3.2 and prior to 0.3.8, 0.4.19, and 0.5.6 of the Net::IMAP library are affected.

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

Update the ruby3.3 package to version 3.3.8-1 or higher to mitigate the vulnerability.

Vulert monitors and alerts for open-source vulnerabilities in software using just a manifest file. It helps developers keep their applications secure without requiring access to the code.

Related vulnerabilities

Recent vulnerabilities recorded for ruby3.3.

How To Fix

Minimum fixed version

3.3.8-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ruby3.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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