CVE-2025-25186
Net::IMAP vulnerable to possible DoS by memory exhaustion
Reported by github_m · Published February 10, 2025
net-imap is fixed in 0.5.6, 0.4.19 and 0.3.8 (RubyGems)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| net-imap | RubyGems | 0.5.6, 0.4.19, 0.3.8 |
| logstash-jre-bcfips | Chainguard | 8.17.3-r0 |
| ruby3.2-rubygem-bundler | Amazon Linux | 2.4.19-183.amzn2023.0.4 |
| ruby3.2-rubygem-rbs | Amazon Linux | 2.8.2-183.amzn2023.0.4 |
| ruby3.2-rubygem-rake | Amazon Linux | 13.0.6-183.amzn2023.0.4 |
| ruby3.2-rails-7.2 | Chainguard | 7.2.2.1-r2 |
| ruby3.2-rubygem-io-console | Amazon Linux | 0.6.0-183.amzn2023.0.4 |
| ruby3.2-rubygem-json | Amazon Linux | 2.6.3-183.amzn2023.0.4 |
| ruby3.4-rails-7.2 | Chainguard | 7.2.2.1-r2 |
| ruby3.2-rubygem-bigdecimal | Amazon Linux | 3.1.3-183.amzn2023.0.4 |
| ruby3.4-net-imap | Chainguard | 0.5.6-r0 |
| ruby3.2-default-gems | Amazon Linux | 3.2.7-183.amzn2023.0.4 |
27 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| ruby | net-imap | >= 0.3.2, < 0.3.8, >= 0.4.0, < 0.4.19, >= 0.5.0, < 0.5.6 |
| chainguard | logstash-jre-bcfips | 0 |
| amazon:2023 | ruby3.2-rubygem-bundler | 0 |
| amazon:2023 | ruby3.2-rubygem-rbs | 0 |
| amazon:2023 | ruby3.2-rubygem-rake | 0 |
| chainguard | ruby3.2-rails-7.2 | 0 |
| amazon:2023 | ruby3.2-rubygem-io-console | 0 |
| amazon:2023 | ruby3.2-rubygem-json | 0 |
| chainguard | ruby3.4-rails-7.2 | 0 |
| amazon:2023 | ruby3.2-rubygem-bigdecimal | 0 |
| chainguard | ruby3.4-net-imap | 0 |
| amazon:2023 | ruby3.2-default-gems | 0 |
| amazon:2023 | ruby3.2-rubygem-psych | 0 |
| wolfi | ruby3.4-net-imap | 0 |
| amazon:2023 | ruby3.2-rubygem-rdoc | 0 |
| wolfi | ruby3.3-rails-8.0 | 0 |
| wolfi | ruby3.2-rails-8.0 | 0 |
| amazon:2023 | ruby3.2-bundled-gems | 0 |
| chainguard | ruby3.4-rails-7.1 | 0 |
| amazon:2023 | ruby3.2-rubygem-test-unit | 0 |
…and 29 more
Timeline
- Feb 10, 2025 CVE Published
- Feb 11, 2025 EPSS Score (30 in total, the first dated here)
- Feb 12, 2025 CVE Updated
- May 13, 2026 Security Advisory
- Jun 16, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-25186
vulnetix vdb fixes CVE-2025-25186
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-25186/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/ruby/net-imap/security/advisories/GHSA-7fc5-f82f-cx69 x_refsource_CONFIRM
- https://github.com/ruby/net-imap/commit/70e3ddd071a94e450b3238570af482c296380b35 x_refsource_MISC
- https://github.com/ruby/net-imap/commit/c8c5a643739d2669f0c9a6bb9770d0c045fd74a3 x_refsource_MISC
- https://github.com/ruby/net-imap/commit/cb92191b1ddce2d978d01b56a0883b6ecf0b1022 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2025-25186 advisory
- https://github.com/advisories/GHSA-7fc5-f82f-cx69 advisory
- https://github.com/ruby/net-imap url
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2025-25186.yml advisory
- https://ruby.github.io/net-imap/Net/IMAP/AppendUIDData.html url
- https://ruby.github.io/net-imap/Net/IMAP/CopyUIDData.html url
- https://ruby.github.io/net-imap/Net/IMAP/UIDPlusData.html url