Vulnerabilities

CVE-2025-43857

Medium 6.5 CVSS 3.1

Description

Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to versions 0.5.7, 0.4.20, 0.3.9, and 0.2.5, there is a possibility for denial of service by memory exhaustion when net-imap reads server responses. At any time while the client is connected, a malicious server can send can send a "literal" byte count, which is automatically read by the client's receiver thread. The response reader immediately allocates memory for the number of bytes indicated by the server response. This should not be an issue when securely connecting to trusted IMAP servers that are well-behaved. It can affect insecure connections and buggy, untrusted, or compromised servers (for example, connecting to a user supplied hostname). This issue has been patched in versions 0.5.7, 0.4.20, 0.3.9, and 0.2.5.

Description as published by the source, in English.

Key facts

Published
2025-04-28
Last modified
2026-06-17
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Scored by
nvd@nist.gov (NVD Primary)
Probability of exploitation
0.5 % higher than 38 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Yes, see references

Affected products

Vendor Product Versions Status
net-imap (RubyGems) < 0.2.5 Affected
net-imap (RubyGems) ≥ 0.3.0, < 0.3.9 Affected
net-imap (RubyGems) ≥ 0.4.0, < 0.4.20 Affected
net-imap (RubyGems) ≥ 0.5.0, < 0.5.7 Affected
Ruby-lang Net::imap < 0.2.5 Affected
Ruby-lang Net::imap ≥ 0.3.0, < 0.3.9 Affected
Ruby-lang Net::imap ≥ 0.4.0, < 0.4.20 Affected
Ruby-lang Net::imap ≥ 0.5.0, < 0.5.7 Affected

Weakness type

Attack techniques

Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK. This shows which techniques the weakness class is historically used for. It does not assert that this vulnerability has been exploited that way.

  • T1498.001: Direct Network Flood impact
  • T1498.002: Reflection Amplification impact
  • T1499: Endpoint Denial of Service impact
  • T1499.001: OS Exhaustion Flood impact
  • T1499.002: Service Exhaustion Flood impact
  • T1499.003: Application Exhaustion Flood impact

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities