# CVE-2025-25186: Net::IMAP vulnerable to possible DoS by memory exhaustion

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.63%, higher than 51% of CVEs (2026-12-01)
- Published: 2025-02-10T15:55:56.666Z
- Modified: 2026-09-10T03:50:22.610Z
- Also known as: GHSA-7fc5-f82f-cx69
- Weaknesses: CWE-400, CWE-405, CWE-409, CWE-770, CWE-789, CWE-1287
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- ruby net-imap: >= 0.3.2, < 0.3.8; >= 0.4.0, < 0.4.19; >= 0.5.0, < 0.5.6
- net-imap (RubyGems): from 0.3.2 before 0.3.8; from 0.4.0 before 0.4.19; from 0.5.0 before 0.5.6

## Every score

- GitHub_M: 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`
- GitHub: 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`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/ruby/net-imap/security/advisories/GHSA-7fc5-f82f-cx69> (web)
- <https://github.com/ruby/net-imap/commit/70e3ddd071a94e450b3238570af482c296380b35> (web)
- <https://github.com/ruby/net-imap/commit/c8c5a643739d2669f0c9a6bb9770d0c045fd74a3> (web)
- <https://github.com/ruby/net-imap/commit/cb92191b1ddce2d978d01b56a0883b6ecf0b1022> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-25186> (advisory)
- <https://github.com/ruby/net-imap> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2025-25186.yml> (web)
- <https://ruby.github.io/net-imap/Net/IMAP/AppendUIDData.html> (web)
- <https://ruby.github.io/net-imap/Net/IMAP/CopyUIDData.html> (web)
- <https://ruby.github.io/net-imap/Net/IMAP/UIDPlusData.html> (web)

## Sources

- CVE List: [CVE-2025-25186](https://www.cve.org/CVERecord?id=CVE-2025-25186), CVE Terms of Use, modified 2025-02-12
- GitHub Advisory Database: [GHSA-7fc5-f82f-cx69](https://github.com/advisories/GHSA-7fc5-f82f-cx69), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-25186](https://nvd.nist.gov/vuln/detail/CVE-2025-25186), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-25186 · Whole record: https://cve.day/CVE-2025-25186.json · Rebuilt by cve.day 2026-11-25T22:58:53.927Z
