CVE-2025-43857

6.5 MEDIUM
Published: April 28, 2025 Modified: November 21, 2025

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://github.com/ruby/net-imap/pull/442
Source: security-advisories@github.com
Issue Tracking Patch
https://github.com/ruby/net-imap/pull/445
Source: security-advisories@github.com
Issue Tracking Patch
https://github.com/ruby/net-imap/pull/446
Source: security-advisories@github.com
Issue Tracking Patch
https://github.com/ruby/net-imap/pull/447
Source: security-advisories@github.com
Issue Tracking Patch
https://github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mj
Source: security-advisories@github.com
Vendor Advisory

6 reference(s) from NVD

Quick Stats

CVSS v3 Score
6.5 / 10.0
EPSS (Exploit Probability)
0.1%
35th percentile
Exploitation Status
Not in CISA KEV

Affected Vendors

ruby-lang