Skip to content
Fencer Vulns
medium 6.5

CVE-2025-25186 json

Net::IMAP vulnerable to possible DoS by memory exhaustion

published 2025-02-10 20 mo ago modified 2026-09-10 1 mo ago also EUVD-2025-4076 , GHSA-7fc5-f82f-cx69

cvss
6.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 50%
public exploits
0
none known

Summary

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.

Patch / fix

  • rubygems net-imap 0.3.8, 0.4.19, 0.5.6
  • ruby-lang net-imap 0.3.8, 0.4.19, 0.5.6
  • ruby-lang net::imap 0.3.8, 0.4.19, 0.5.6
  • ruby3.3 Debian 14, Debian 13 3.3.8-1

debian advisories DEBIAN-CVE-2025-25186

  • ruby3.2 Ubuntu 24.04 LTS 3.2.3-1ubuntu0.24.04.5

ubuntu advisories UBUNTU-CVE-2025-25186

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • ruby RHEL 8 3.3.8-4.module+el8.10.0+23024+a87ba659
  • rubygems RHEL 8 3.5.22-4.module+el8.10.0+23024+a87ba659
  • ruby-libs RHEL 8 3.3.8-4.module+el8.10.0+23024+a87ba659
  • rubygem-pg RHEL 8 1.5.4-1.module+el8.10.0+21226+b78a28c4
  • rubygem-irb RHEL 8 1.13.1-4.module+el8.10.0+23024+a87ba659
  • rubygem-rbs RHEL 8 3.4.0-4.module+el8.10.0+23024+a87ba659
  • rubygem-rss RHEL 8 0.3.1-4.module+el8.10.0+23024+a87ba659
  • rubygem-abrt RHEL 8 0.4.0-1.module+el8.10.0+21226+b78a28c4

red hat advisories RHSA-2025:10217RHSA-2025:8131RHSA-2025:4493

  • ruby AlmaLinux 8 3.3.8-4.module_el8.10.0+4022+8b66723c
  • rubygems AlmaLinux 8 3.5.22-4.module_el8.10.0+4022+8b66723c
  • ruby-libs AlmaLinux 8 3.3.8-4.module_el8.10.0+4022+8b66723c
  • rubygem-pg AlmaLinux 8 1.5.4-1.module_el8.10.0+3799+191214cc
  • rubygem-irb AlmaLinux 8 1.13.1-4.module_el8.10.0+4022+8b66723c
  • rubygem-rbs AlmaLinux 8 3.4.0-4.module_el8.10.0+4022+8b66723c
  • rubygem-rss AlmaLinux 8 0.3.1-4.module_el8.10.0+4022+8b66723c
  • rubygem-abrt AlmaLinux 8 0.4.0-1.module_el8.10.0+3799+191214cc

almalinux advisories ALSA-2025:10217ALSA-2025:8131

  • ruby Rocky Linux 10 3.3.8-10.el10_0
  • ruby Rocky Linux 9 3.3.8-4.module+el9.6.0+31867+3a5bf654
  • rubygem-pg Rocky Linux 9 1.5.4-1.module+el9.6.0+31867+3a5bf654
  • rubygem-mysql2 Rocky Linux 9 0.5.5-1.module+el9.6.0+31867+3a5bf654
  • ruby Rocky Linux 8 3.3.8-4.module+el8.10.0+2004+fd6e8d72
  • rubygem-pg Rocky Linux 8 1.5.4-1.module+el8.10.0+1827+16ecb9d2
  • rubygem-pg Rocky Linux 8 1.5.4-1.module+el8.10.0+1679+61871737
  • rubygem-abrt Rocky Linux 8 0.4.0-1.module+el8.10.0+1827+16ecb9d2

rocky linux advisories RLSA-2025:8131RLSA-2025:4493RLSA-2025:10217

  • ruby Azure Linux 3.0 3.3.5-3

azure linux advisories AZL-56555

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2025-25186 updated cvss 6.5

net-imap: Net::IMAP vulnerable to possible DoS by memory exhaustion

  • Red Hat 3scale API Management Platform 2 3scale-amp2/zync-rhel7
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux 6 ruby, ruby-ri, ruby-irb, ruby-libs, ruby-rdoc, ruby-tcltk Red Hat Enterprise Linux 7 ruby, ruby-irb, rubygems, ruby-libs, ruby-tcltk, rubygem-json, +6 more Red Hat Enterprise Linux 8 ruby, ruby-irb, rubygems, ruby-libs, rubygem-pg, rubygem-irb, +25 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 9 ruby-33 Red Hat Enterprise Linux 10 flatpak-sdk
    affected: no fix available
  • Red Hat Enterprise Linux AppStream (v. 8) ruby 3.3.8-4.module+el8.10.0+23024+a87ba659, ruby-libs 3.3.8-4.module+el8.10.0+23024+a87ba659, rubygems 3.5.22-4.module+el8.10.0+23024+a87ba659, rubygem-pg 1.5.4-1.module+el8.10.0+21226+b78a28c4, rubygem-rbs 3.4.0-4.module+el8.10.0+23024+a87ba659, rubygem-rss 0.3.1-4.module+el8.10.0+23024+a87ba659, +18 more
    fixed: vendor fix RHSA-2025:10217
  • Red Hat Enterprise Linux AppStream (v. 9) ruby 3.3.8-4.module+el9.5.0+23030+26c9b8e1, ruby-libs 3.3.8-4.module+el9.5.0+23030+26c9b8e1, rubygems 3.5.22-4.module+el9.5.0+23030+26c9b8e1, rubygem-pg 1.5.4-1.module+el9.4.0+21222+faeeed2f, rubygem-rbs 3.4.0-4.module+el9.5.0+23030+26c9b8e1, rubygem-rss 0.3.1-4.module+el9.5.0+23030+26c9b8e1, +17 more
    fixed: vendor fix RHSA-2025:4493
  • Red Hat Enterprise Linux AppStream (v. 10) ruby 3.3.8-10.el10_0, ruby-libs 3.3.8-10.el10_0, rubygems 3.5.22-10.el10_0, rubygem-rbs 3.4.0-10.el10_0, rubygem-rss 0.3.1-10.el10_0, rubygem-irb 1.13.1-10.el10_0, +15 more Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) ruby-doc 3.3.8-10.el10_0
    fixed: vendor fix RHSA-2025:8131
  • Red Hat RHOL 5.9 for RHEL 9 openshift-logging/fluentd-rhel9 v5.9.13-5, openshift-logging/vector-rhel9 v0.34.1-37, openshift-logging/eventrouter-rhel9 v0.4.0-363, openshift-logging/logging-loki-rhel9 v3.3.2-36, openshift-logging/loki-rhel9-operator v5.9.13-9, openshift-logging/opa-openshift-rhel9 v0.1.0-383, +6 more
    fixed: vendor fix RHSA-2025:3906
  • Red Hat Enterprise Linux 9 ruby, ruby-30, ruby-31, rubygems, ruby-libs, rubygem-irb, +15 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
20 mo ago

Exploit prediction

0.63% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHub 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
rubygems net-imap
>=0.3.2, <0.3.8
>=0.4.0, <0.4.19
>=0.5.0, <0.5.6
0.3.8
0.4.19
0.5.6

Affected products

  • ruby net-imap

Classification

Weakness
  • CWE-400 Uncontrolled Resource Consumption
  • CWE-405 Asymmetric Resource Consumption (Amplification)
  • CWE-409 Improper Handling of Highly Compressed Data (Data Amplification)
  • CWE-770 Allocation of Resources Without Limits or Throttling
  • CWE-789 Memory Allocation with Excessive Size Value
  • CWE-1287 Improper Validation of Specified Type of Input

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.