Vulnerability · Published Feb 10, 2025 · Assigned by GitHub_M

CVE-2025-25186Net::IMAP vulnerable to possible DoS by memory exhaustion

Medium 6.5

In plain English

A medium-severity uncontrolled resource consumption in net-imap from ruby. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.6%top 49.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8ruby3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8ruby-bundled-gems3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10ruby-default-gems3.3.8-10.el10_0ALSA-2025:8131
AlmaLinux:8ruby-default-gems3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8ruby-devel3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10ruby-doc3.3.8-10.el10_0ALSA-2025:8131
AlmaLinux:8ruby-doc3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8ruby-libs3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-abrt0.4.0-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux:8rubygem-abrt-doc0.4.0-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux:8rubygem-bigdecimal3.1.5-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-bundler2.5.22-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-bundler2.5.22-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-io-console0.7.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-irb1.13.1-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-irb1.13.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-json2.7.2-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-minitest5.20.0-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-minitest5.20.0-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-mysql20.5.5-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux:8rubygem-mysql2-doc0.5.5-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux:8rubygem-pg1.5.4-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux:8rubygem-pg-doc1.5.4-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux:10rubygem-power_assert2.0.3-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-power_assert2.0.3-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-psych5.1.2-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-racc1.7.3-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-rake13.1.0-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-rake13.1.0-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:8rubygem-rbs3.4.0-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-rdoc6.6.3.1-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-rdoc6.6.3.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-rexml3.3.9-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-rexml3.3.9-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-rss0.3.1-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-rss0.3.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-test-unit3.6.1-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-test-unit3.6.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygem-typeprof0.21.9-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygem-typeprof0.21.9-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygems3.5.22-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygems3.5.22-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux:10rubygems-devel3.5.22-10.el10_0ALSA-2025:8131
AlmaLinux:8rubygems-devel3.5.22-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
Debian:12ruby3.1no fix listedDEBIAN-CVE-2025-25186
Debian:13ruby3.33.3.8-1DEBIAN-CVE-2025-25186
Debian:14ruby3.33.3.8-1DEBIAN-CVE-2025-25186
Rocky Linux:10ruby0:3.3.8-10.el10_0RLSA-2025:8131
Rocky Linux:8ruby0:3.3.8-4.module+el8.10.0+2004+fd6e8d72RLSA-2025:10217
Rocky Linux:9ruby0:3.3.8-4.module+el9.6.0+31867+3a5bf654RLSA-2025:4493
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1820+f3fffb92RLSA-2025:10217
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1826+b62220b4RLSA-2025:10217
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1741+bdb5b6caRLSA-2025:10217
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1679+61871737RLSA-2025:10217
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.9.0+1537+0b2034bdRLSA-2025:10217
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.5.0+668+665814faRLSA-2025:10217
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1827+16ecb9d2RLSA-2025:10217
Rocky Linux:8rubygem-mysql20:0.5.5-1.module+el8.10.0+1827+16ecb9d2RLSA-2025:10217
Rocky Linux:8rubygem-mysql20:0.5.5-1.module+el8.10.0+1679+61871737RLSA-2025:10217
Rocky Linux:9rubygem-mysql20:0.5.5-1.module+el9.6.0+31867+3a5bf654RLSA-2025:4493
Rocky Linux:8rubygem-pg0:1.5.4-1.module+el8.10.0+1679+61871737RLSA-2025:10217
Rocky Linux:8rubygem-pg0:1.5.4-1.module+el8.10.0+1827+16ecb9d2RLSA-2025:10217
Rocky Linux:9rubygem-pg0:1.5.4-1.module+el9.6.0+31867+3a5bf654RLSA-2025:4493
RubyGemsnet-imap0.5.6GHSA-7fc5-f82f-cx69
RubyGemsnet-imap0.3.8GHSA-7fc5-f82f-cx69
RubyGemsnet-imap0.4.19GHSA-7fc5-f82f-cx69
Ubuntu:22.04:LTSruby3.03.0.2-7ubuntu2.10USN-7418-1
Ubuntu:24.04:LTSruby3.23.2.3-1ubuntu0.24.04.5USN-7418-1
Ubuntu:24.04:LTSruby3.23.2.3-1ubuntu0.24.04.5UBUNTU-CVE-2025-25186

Affected products (as reported)

VendorProductVersions
ruby net-imap >= 0.3.2, < 0.3.8>= 0.4.0, < 0.4.19>= 0.5.0, < 0.5.6

Weakness: CWE-400, CWE-405, CWE-409, CWE-770, CWE-789, CWE-1287 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

References