CVE-2025-25186 Details
Description
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Starting in version 0.3.2 and prior to versions 0.3.8, 0.4.19, and 0.5.6, there is a possibility for denial of service by memory exhaustion in `net-imap`'s response parser. At any time while the client is connected, a malicious server can send can send highly compressed `uid-set` data which is automatically read by the client's receiver thread. The response parser uses `Range#to_a` to convert the `uid-set` data into arrays of integers, with no limitation on the expanded size of the ranges. Versions 0.3.8, 0.4.19, 0.5.6, and higher fix this issue. Additional details for proper configuration of fixed versions and backward compatibility are available in the GitHub Security Advisory.
A denial-of-service vulnerability has been identified in the Ruby library Net::IMAP, which implements Internet Message Access Protocol (IMAP) client functionality. This issue is present in versions 0.3.2 prior to 0.3.8, as well as in versions 0.4.0 prior to 0.4.19 and 0.5.0 prior to 0.5.6. The vulnerability arises in the response parser, where a malicious server can send highly compressed 'uid-set' data. This data is automatically processed by the client's receiver thread, expanding the ranges into arrays of integers without any size limitations. As a result, the vulnerability can lead to significant memory exhaustion on the client side.
Users can upgrade to Net::IMAP versions 0.3.8, 0.4.19, 0.5.6 or higher. For versions 0.4.19 and 0.5.6, the default configuration allows for a maximum 'uid-set' size that can be parsed into the deprecated 'UIDPlusData' format. This limit can be adjusted by setting 'parser_max_deprecated_uidplus_data_size' to a desired value. In version 0.6.0, 'UIDPlusData' will be removed entirely, and the response parser will only use the 'AppendUIDData' or 'CopyUIDData' formats, which are backward-compatible with most applications.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Feb 10, 2025CISA-ADP
Assessed Feb 10, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ruby/net-imap/commit/70e3ddd071a94e450b3238570af482c296380b35 | [email protected] | Source CodeVendor |
| https://github.com/ruby/net-imap/commit/c8c5a643739d2669f0c9a6bb9770d0c045fd74a3 | [email protected] | Source CodeVendor |
| https://github.com/ruby/net-imap/commit/cb92191b1ddce2d978d01b56a0883b6ecf0b1022 | [email protected] | Source CodeVendor |
| https://github.com/ruby/net-imap/security/advisories/GHSA-7fc5-f82f-cx69 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1287 | Improper Validation of Specified Type of Input | [email protected] |
| CWE-400 | Uncontrolled Resource Consumption | [email protected] |
| CWE-405 | Asymmetric Resource Consumption (Amplification) | [email protected] |
| CWE-409 | Improper Handling of Highly Compressed Data (Data Amplification) | [email protected] |
| CWE-770 | Allocation of Resources Without Limits or Throttling | [email protected] |
| CWE-789 | Memory Allocation with Excessive Size Value | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| ruby-net-imap | >= 0.3.2, < 0.3.8 (semver) >= 0.4.0, < 0.4.19 (semver) >= 0.5.0, < 0.5.6 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 10, 2025 | New CVE Received | [email protected] |
Volerion