Net::IMAP vulnerable to possible DoS by memory exhaustion
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 5 fixed, 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-400.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ruby | net-imap | 0.3.2 to before 0.3.8; 0.4.0 to before 0.4.19; 0.5.0 to before 0.5.6 | 0.3.8, 0.4.19, 0.5.6 | Patch available | CNA |
| — | net-imap (RubyGems) | 0.3.2 to before 0.3.8 | 0.3.8 | Patch available | GHSA-7fc5-f82f-cx69 |
| — | net-imap (RubyGems) | 0.4.0 to before 0.4.19 | 0.4.19 | Patch available | GHSA-7fc5-f82f-cx69 |
| — | net-imap (RubyGems) | 0.5.0 to before 0.5.6 | 0.5.6 | Patch available | GHSA-7fc5-f82f-cx69 |
- net-imap Vendorruby Affected 0.3.2 to before 0.3.8; 0.4.0 to before 0.4.19; 0.5.0 to before 0.5.6 Fixed in 0.3.8, 0.4.19, 0.5.6 Patch available CNA
- net-imap (RubyGems) Vendor— Affected 0.3.2 to before 0.3.8 Fixed in 0.3.8 Patch available GHSA-7fc5-f82f-cx69
- net-imap (RubyGems) Vendor— Affected 0.4.0 to before 0.4.19 Fixed in 0.4.19 Patch available GHSA-7fc5-f82f-cx69
- net-imap (RubyGems) Vendor— Affected 0.5.0 to before 0.5.6 Fixed in 0.5.6 Patch available GHSA-7fc5-f82f-cx69
Remediation
- Fix · CNA net-imap (ruby) Fixed in 0.3.8, 0.4.19, 0.5.6
- Fix · GHSA-7fc5-f82f-cx69 net-imap (RubyGems) Fixed in 0.3.8 Advisory →
- Fix · GHSA-7fc5-f82f-cx69 net-imap (RubyGems) Fixed in 0.4.19 Advisory →
- Fix · GHSA-7fc5-f82f-cx69 net-imap (RubyGems) Fixed in 0.5.6 Advisory →
Red Hat 4 advisories
- RHSA-2025:10217 Released 2025-07-02 · Red Hat rating Moderateruby:3.3 security update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-3.3.8-4.module+el8.10.0+23024+a87ba659.aarch64::ruby:3.3, ruby-3.3.8-4.module+el8.10.0+23024+a87ba659.i686::ruby:3.3, ruby-3.3.8-4.module+el8.10.0+23024+a87ba659.ppc64le::ruby:3.3 +47
- RHSA-2025:8131 Released 2025-05-26 · Red Hat rating Moderateruby security update
- Red Hat Enterprise Linux AppStream (v. 10) ruby-3.3.8-10.el10_0, ruby-bundled-gems-3.3.8-10.el10_0, ruby-default-gems-3.3.8-10.el10_0 +20
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) ruby-doc-3.3.8-10.el10_0
- RHSA-2025:4493 Released 2025-05-06 · Red Hat rating Moderateruby:3.3 security update
- Red Hat Enterprise Linux AppStream (v. 9) ruby-3.3.8-4.module+el9.5.0+23030+26c9b8e1.aarch64::ruby:3.3, ruby-3.3.8-4.module+el9.5.0+23030+26c9b8e1.i686::ruby:3.3, ruby-3.3.8-4.module+el9.5.0+23030+26c9b8e1.ppc64le::ruby:3.3 +47
Show 1 more Red Hat advisories
- RHSA-2025:3906 Released 2025-04-16 · Red Hat rating ImportantLogging for Red Hat OpenShift - 5.9.13
- RHOL 5.9 for RHEL 9 openshift-logging/cluster-logging-operator-bundle, openshift-logging/cluster-logging-rhel9-operator, openshift-logging/eventrouter-rhel9 +9
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 10 | Affected | No fix yet |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 8 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 9 | Affected | No fix yet |
| RHOL 5.9 for RHEL 9 | Fixed | RHSA-2025:3906 |
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2025:8131 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2025:10217 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2025:4493 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | RHSA-2025:8131 |
Not affected: 1 product
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2025-25186
- 2026-10-03 Alias added: GHSA-7fc5-f82f-cx69
- 2026-10-31 EPSS moved to the 50th–90th percentile
References
Other 9
- https://github.com/ruby/net-imap/security/advisories/GHSA-7fc5-f82f-cx69
- https://github.com/ruby/net-imap/commit/70e3ddd071a94e450b3238570af482c296380b35
- https://github.com/ruby/net-imap/commit/c8c5a643739d2669f0c9a6bb9770d0c045fd74a3
- https://github.com/ruby/net-imap/commit/cb92191b1ddce2d978d01b56a0883b6ecf0b1022
- https://github.com/ruby/net-imap
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2025-25186.yml
- https://ruby.github.io/net-imap/Net/IMAP/AppendUIDData.html
- https://ruby.github.io/net-imap/Net/IMAP/CopyUIDData.html
- https://ruby.github.io/net-imap/Net/IMAP/UIDPlusData.html
More ruby vulnerabilities
- TI-2026-71508 Integer overflow in GitLab allows code execution on the server KEVCVSS 3.1CRITICAL 10.0
- TI-2026-50176 Use after free in ruby json CVSS 4.0HIGH 8.7
- TI-2017-12709 Ruby before 2.4.3 allows Net::FTP command injection. CVSS 3.0HIGH 8.8
- TI-2008-03501 Algorithmic complexity vulnerability in the WEBrick::HTTPUtils.split_header_value… CVSS 2.0HIGH 7.8
- TI-2021-09891 In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web… CVSS 3.1HIGH 7.5
- TI-2013-03637 Heap-based buffer overflow in Ruby 1.8, 1.9 before 1.9.3-p484, 2.0 before 2.0.0-p353, 2.1… CVSS 2.0MEDIUM 6.8
Sources
- CVE-2025-25186 · CVE Program
- CVE-2025-25186 · NVD
- FIRST EPSS
- GHSA-7fc5-f82f-cx69 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-25186 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences