CVE-2025-43857
April 28, 2025
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.
Affected Packages
https://github.com/ruby/net-imap.git (GITHUB):
Affected version(s) >=v0.1.0 <v0.2.5Fix Suggestion:
Update to version v0.2.5https://github.com/ruby/net-imap.git (GITHUB):
Affected version(s) >=v0.3.0 <v0.3.9Fix Suggestion:
Update to version v0.3.9https://github.com/ruby/net-imap.git (GITHUB):
Affected version(s) >=v0.4.0 <v0.4.20Fix Suggestion:
Update to version v0.4.20https://github.com/ruby/net-imap.git (GITHUB):
Affected version(s) >=v0.5.0 <v0.5.7Fix Suggestion:
Update to version v0.5.7net-imap (RUBY):
Affected version(s) >=0.5.0 <0.5.7Fix Suggestion:
Update to version 0.5.7net-imap (RUBY):
Affected version(s) >=0.4.0 <0.4.20Fix Suggestion:
Update to version 0.4.20net-imap (RUBY):
Affected version(s) >=0.1.0 <0.2.5Fix Suggestion:
Update to version 0.2.5net-imap (RUBY):
Affected version(s) >=0.3.0 <0.3.9Fix Suggestion:
Update to version 0.3.9Related ResourcesĀ (10)
Do you need more information?
Contact UsCVSS v4
Base Score:
6
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
PRESENT
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
EPSS
Base Score:
0.53