{"id":"CVE-2025-43857","published":"2025-04-28T16:02:04Z","modified":"2025-04-28T18:00:01Z","title":"net-imap rubygem vulnerable to possible DoS by memory exhaustion","vendor":"ruby","product":"net-imap","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00504,"percentile":0.43955,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"},{"id":"CWE-789","name":"Memory Allocation with Excessive Size Value"},{"id":"CWE-405","name":"Asymmetric Resource Consumption (Amplification)"}],"references":[{"url":"https://github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ruby/net-imap/pull/442","tags":["x_refsource_MISC"]},{"url":"https://github.com/ruby/net-imap/pull/444/commits/0ae8576c1a90bcd9573f81bdad4b4b824642d105#diff-53721cb4d9c3fb86b95cc8476ca2df90968ad8c481645220c607034399151462","tags":["x_refsource_MISC"]},{"url":"https://github.com/ruby/net-imap/pull/445","tags":["x_refsource_MISC"]},{"url":"https://github.com/ruby/net-imap/pull/446","tags":["x_refsource_MISC"]},{"url":"https://github.com/ruby/net-imap/pull/447","tags":["x_refsource_MISC"]}],"priority":{"score":13.0,"factors":[{"name":"EPSS percentile","points":8.79},{"name":"CVSS severity","points":4.2}]},"vendorSlug":"ruby","affectedVersions":[{"vendor":"ruby","product":"net-imap","versions":[">= 0.5.0, < 0.5.7",">= 0.4.0, < 0.4.20",">= 0.3.0, < 0.3.9",">= 0, < 0.2.5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-28T17:59:30.771022Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"net-imap","vulnerableRanges":[">=0.5.0, <0.5.7",">=0.4.0, <0.4.20",">=0.3.0, <0.3.9","<0.2.5"],"patched":["0.5.7","0.4.20","0.3.9","0.2.5"],"from":["GHSA-j3g3-5qv5-52mj"],"provenance":"source"}],"summary":{"text":"The net-imap RubyGem, which implements IMAP client functionality in Ruby, contains a flaw in its response reader that can lead to memory exhaustion when it processes server responses. An attacker operating a malicious, buggy, or compromised IMAP server can cause a denial of service by sending a large literal byte count that the client's receiver thread allocates memory for immediately; this requires the client to be connected to that server, can affect insecure connections or untrusted hostnames such as user-supplied ones, and requires user interaction to initiate the connection.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:48:57Z"},"euvd":{"id":"EUVD-2025-12559","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-25186","published":"2025-02-10","fixed":"0.5.6","kev":false,"link":{"from":"CVE-2025-25186","to":"CVE-2025-43857","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:net-imap","fromFixed":"0.5.6","toFixed":"0.5.7","daysApart":77},{"kind":"version-step","provenance":"source","package":"RubyGems:net-imap","fromFixed":"0.4.19","toFixed":"0.4.20","daysApart":77}]}},{"cve":"CVE-2025-43857","published":"2025-04-28","fixed":"0.5.7","kev":false},{"cve":"CVE-2026-42245","published":"2026-05-09","fixed":"0.6.4","kev":false},{"cve":"CVE-2026-42246","published":"2026-05-09","fixed":"0.6.4","kev":false,"link":{"from":"CVE-2025-43857","to":"CVE-2026-42246","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:net-imap","fromFixed":"0.3.9","toFixed":"0.3.10","daysApart":376}]}},{"cve":"CVE-2026-42256","published":"2026-05-09","fixed":"0.6.4","kev":false}],"package":"RubyGems:net-imap"}}