CVE-2025-43857: net-imap rubygem vulnerable to possible DoS by memory exhaustion
Affects net-imapSource GCVE Database
Not known to be exploited · CVSS 6.0 Medium : upgrade to 0.5.7 when convenient.
Data as of 15 Nov 2026, 01:53 UTC
- Patch
- Available – fixed in 0.5.7, 0.4.20, 0.3.9 +1
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 28 Apr 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 14 Nov 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsnet-imap | Affected
| Fixed in
|
| RubyGemsnet-imap | Affected
| Fixed in
|
| RubyGemsnet-imap | Affected
| Fixed in
|
| RubyGemsnet-imap | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Users should upgrade net-imap to version 0.5.7 or later, or to 0.4.20, 0.3.9, or 0.2.5 where the max_response_size limit has been backported. After upgrading, configure max_response_size to a suitable value based on the trust level of the IMAP server; lower values are recommended for untrusted or insecure connections. The default max_response_size is very high for compatibility with trusted servers. Users should also implement response handlers to manage excessive unhandled responses, as max_response_size limits only the size per response, not the number of responses.
Description
The net-imap Ruby gem has a vulnerability that may allow a denial of service (DoS) via memory exhaustion when reading server responses containing large literal byte counts. A malicious or compromised IMAP server can specify an arbitrarily large literal size, causing the client to allocate excessive memory. This issue primarily affects connections to untrusted or insecure servers. The vulnerability is fixed in net-imap versions 0.5.7, 0.4.20, 0.3.9, and 0.2.5 by introducing a configurable max_response_size limit to restrict the size of literals processed per response.
References
- github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mj (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-43857 (opens in a new tab)
- github.com/ruby/net-imap/pull/442 (opens in a new tab)
- github.com/ruby/net-imap/pull/444 (opens in a new tab)
- github.com/ruby/net-imap/pull/444/commits/0ae8576c1a90bcd9573f81bdad4b4b824642d105 (opens in a new tab)
- github.com/ruby/net-imap/pull/445 (opens in a new tab)
- github.com/ruby/net-imap/pull/446 (opens in a new tab)
- github.com/ruby/net-imap/pull/447 (opens in a new tab)
- github.com/ruby/net-imap (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2025-43857.yml (opens in a new tab)