CVE-2025-25186
Net::IMAP implements Internet Message Access Protocol (IMAP) client …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/ruby/net-imap/commit/70e3ddd071a94e450b3238570af482c296380b35
- github.com/ruby/net-imap/commit/c8c5a643739d2669f0c9a6bb9770d0c045fd74a3
- github.com/ruby/net-imap/commit/cb92191b1ddce2d978d01b56a0883b6ecf0b1022
- github.com/ruby/net-imap/security/advisories/GHSA-7fc5-f82f-cx69
- nvd.nist.gov/vuln/detail/CVE-2025-25186
- ruby.github.io/net-imap/Net/IMAP/AppendUIDData.html
- ruby.github.io/net-imap/Net/IMAP/CopyUIDData.html
- ruby.github.io/net-imap/Net/IMAP/UIDPlusData.html
- nvd.nist.gov/vuln/detail/CVE-2025-25186
- cve.org/CVERecord?id=CVE-2025-25186
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.