Skip to main content
VulnerabilityPublished Updated

CVE-2025-43857: net-imap rubygem vulnerable to possible DoS by memory exhaustion

Affects net-imapSource GCVE Database

0
Compare

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

CVSS 4.0 base score
6.0Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 28 Apr 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
RubyGemsnet-imapAffected
  • >=0.5.0 <0.5.7
Fixed in
  • 0.5.7
RubyGemsnet-imapAffected
  • >=0.4.0 <0.4.20
Fixed in
  • 0.4.20
RubyGemsnet-imapAffected
  • >=0.3.0 <0.3.9
Fixed in
  • 0.3.9
RubyGemsnet-imapAffected
  • <0.2.5
Fixed in
  • 0.2.5

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

Community reviews

Loading reviews…