cve.bz

CVE-2025-25186 ruby net-imap: Uncontrolled Resource Consumption

6.5 mediumEPSS 0.6%Fix available

Medium (6.5) in ruby net-imap. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in net-imap 0.3.8, 0.4.19, 0.5.6.

On this page
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.

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 51st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-02-10. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
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
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-25186 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-25186?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-25186?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-25186 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

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

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-7fc5-f82f-cx69RubyGemsnet-imap>=0.3.2 <0.3.80.3.8
GHSA-7fc5-f82f-cx69RubyGemsnet-imap>=0.4.0 <0.4.190.4.19
GHSA-7fc5-f82f-cx69RubyGemsnet-imap>=0.5.0 <0.5.60.5.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12ruby3.1no fix listedDEBIAN-CVE-2025-25186
Debian13, 14ruby3.33.3.8-1DEBIAN-CVE-2025-25186
Ubuntu20.04:LTSruby2.72.7.0-5ubuntu1.18USN-7418-1
Ubuntu22.04:LTSruby3.03.0.2-7ubuntu2.10USN-7418-1
Ubuntu24.04:LTSruby3.23.2.3-1ubuntu0.24.04.5UBUNTU-CVE-2025-25186 USN-7418-1
Red Hatenterprise_linux:8::appstreamruby, ruby-doc, ruby-libs and 7 more0:3.3.8-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-abrt, rubygem-abrt-doc0:0.4.0-1.module+el8.10.0+21226+b78a28c4RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-bigdecimal, rubygem-bigdecimal-debuginfo0:3.1.5-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-bundler0:2.5.22-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-io-console, rubygem-io-console-debuginfo0:0.7.1-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-irb0:1.13.1-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-json, rubygem-json-debuginfo0:2.7.2-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-minitest0:5.20.0-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-mysql2, rubygem-mysql2-doc, rubygem-mysql2-debuginfo and 1 more0:0.5.5-1.module+el8.10.0+21226+b78a28c4RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-pg, rubygem-pg-doc, rubygem-pg-debuginfo and 1 more0:1.5.4-1.module+el8.10.0+21226+b78a28c4RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-power_assert0:2.0.3-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
Red Hatenterprise_linux:8::appstreamrubygem-psych, rubygem-psych-debuginfo0:5.1.2-4.module+el8.10.0+23024+a87ba659RHSA-2025:10217
47 more for Red Hat in the JSON and on Red Hat's page.
AlmaLinux8ruby, ruby-doc, ruby-libs and 3 more3.3.8-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-abrt, rubygem-abrt-doc0.4.0-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux8rubygem-bigdecimal3.1.5-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-bundler2.5.22-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-io-console0.7.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-irb1.13.1-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-json2.7.2-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-minitest5.20.0-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-mysql2, rubygem-mysql2-doc0.5.5-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux8rubygem-pg, rubygem-pg-doc1.5.4-1.module_el8.10.0+3799+191214ccALSA-2025:10217
AlmaLinux8rubygem-power_assert2.0.3-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
AlmaLinux8rubygem-psych5.1.2-4.module_el8.10.0+4022+8b66723cALSA-2025:10217
21 more for AlmaLinux in the JSON.
Rocky Linux8ruby0:3.3.8-4.module+el8.10.0+2004+fd6e8d72RLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1679+61871737RLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1741+bdb5b6caRLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1820+f3fffb92RLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1826+b62220b4RLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.10.0+1827+16ecb9d2RLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.5.0+668+665814faRLSA-2025:10217
Rocky Linux8rubygem-abrt0:0.4.0-1.module+el8.9.0+1537+0b2034bdRLSA-2025:10217
Rocky Linux8rubygem-mysql20:0.5.5-1.module+el8.10.0+1679+61871737RLSA-2025:10217
Rocky Linux8rubygem-mysql20:0.5.5-1.module+el8.10.0+1827+16ecb9d2RLSA-2025:10217
Rocky Linux8rubygem-pg0:1.5.4-1.module+el8.10.0+1679+61871737RLSA-2025:10217
Rocky Linux8rubygem-pg0:1.5.4-1.module+el8.10.0+1827+16ecb9d2RLSA-2025:10217
4 more for Rocky Linux in the JSON.
Azure Linux3ruby3.3.5-3AZL-56555
Alpaquitastreamruby-net-imap0.5.6-r0BELL-CVE-2025-25186

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · Alpaquita.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10ruby-0:3.3.8-10.el10_0Fixed 2025-05-26RHSA-2025:8131
Red Hat Enterprise Linux 8ruby:3.3-8100020250414172630.489197e6Fixed 2025-07-02RHSA-2025:10217
Red Hat Enterprise Linux 9ruby:3.3-9050020250415095239.9Fixed 2025-05-06RHSA-2025:4493
RHOL-5.9-RHEL-9openshift-logging/cluster-logging-operator-bundle:v5.9.13-22Fixed 2025-04-16RHSA-2025:3906
RHOL-5.9-RHEL-9openshift-logging/cluster-logging-rhel9-operator:v5.9.13-9Fixed 2025-04-16RHSA-2025:3906
RHOL-5.9-RHEL-9openshift-logging/eventrouter-rhel9:v0.4.0-363Fixed 2025-04-16RHSA-2025:3906
RHOL-5.9-RHEL-9openshift-logging/fluentd-rhel9:v5.9.13-5Fixed 2025-04-16RHSA-2025:3906
RHOL-5.9-RHEL-9openshift-logging/log-file-metric-exporter-rhel9:v1.1.0-346Fixed 2025-04-16RHSA-2025:3906
RHOL-5.9-RHEL-9openshift-logging/logging-loki-rhel9:v3.3.2-36Fixed 2025-04-16RHSA-2025:3906
RHOL-5.9-RHEL-9openshift-logging/logging-view-plugin-rhel9:v5.9.13-7Fixed 2025-04-16RHSA-2025:3906
Red Hat 3scale API Management Platform 23scale-amp2/zync-rhel8Will not fix
Red Hat Enterprise Linux 10rhel10-beta/flatpak-sdkAffected
Red Hat Enterprise Linux 6rubyOut of support scope
Red Hat Enterprise Linux 7rubyOut of support scope
Red Hat Enterprise Linux 8ruby:2.5/rubyOut of support scope
Red Hat Enterprise Linux 8ruby:3.1/rubyOut of support scope
Red Hat Enterprise Linux 9rhel9/ruby-30Not affected
Red Hat Enterprise Linux 9rhel9/ruby-31Not affected
Red Hat Enterprise Linux 9rhel9/ruby-33Affected
Red Hat Enterprise Linux 9rubyNot affected
9 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-25186.

Attack patterns (CAPEC)

  • CAPEC-147 XML Ping of the Death Likelihood: Low · Severity: Medium
  • CAPEC-227 Sustained Client Engagement
  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-770 (20).

References

Check your stackJSON