cve.bz

CVE-2025-43857 ruby-lang net\: Uncontrolled Resource Consumption

6.0 mediumEPSS 0.5%Fix available

Medium (6.0) in ruby-lang net\. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in net-imap 0.2.5, 0.3.9, 0.4.20.

On this page
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.

Severity

CVSS 4.0

6.0 medium
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

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 44th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-04-28. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-770 Allocation of Resources Without Limits or Throttling
CWE-400 Uncontrolled Resource Consumption
CWE-405 Asymmetric Resource Consumption (Amplification)
CWE-789 Memory Allocation with Excessive Size Value
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-43857 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-43857?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-43857?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-43857 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

  • ruby-lang:net\

Versions

From the NVD's CPE matches.

ProductAffected
ruby-lang:net\before 0.2.5
ruby-lang:net\from 0.3.0 before 0.3.9
ruby-lang:net\from 0.4.0 before 0.4.20
ruby-lang:net\from 0.5.0 before 0.5.7

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-j3g3-5qv5-52mjRubyGemsnet-imap>=0.5.0 <0.5.70.5.7
GHSA-j3g3-5qv5-52mjRubyGemsnet-imap>=0.4.0 <0.4.200.4.20
GHSA-j3g3-5qv5-52mjRubyGemsnet-imap>=0.3.0 <0.3.90.3.9
GHSA-j3g3-5qv5-52mjRubyGemsnet-imap<0.2.50.2.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12ruby3.1no fix listedDEBIAN-CVE-2025-43857
Debian13, 14ruby3.3no fix listedDEBIAN-CVE-2025-43857
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 1 morejrubyno fix listedUBUNTU-CVE-2025-43857
Ubuntu22.04:LTSruby3.0no fix listedUBUNTU-CVE-2025-43857
Ubuntu24.04:LTSjruby, ruby3.2no fix listedUBUNTU-CVE-2025-43857
Ubuntu25.10, 26.04:LTS, 26.10jruby, ruby3.3no fix listedUBUNTU-CVE-2025-43857
UbuntuPro:18.04:LTSruby2.5no fix listedUBUNTU-CVE-2025-43857
UbuntuPro:20.04:LTSruby2.7no fix listedUBUNTU-CVE-2025-43857
Alpinev3.20, v3.21ruby-net-imap0.4.22-r0ALPINE-CVE-2025-43857

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Logging Subsystem for Red Hat OpenShiftopenshift-logging/fluentd-rhel9Fix deferred
Red Hat 3scale API Management Platform 23scale-amp2/zync-rhel9Fix deferred
Red Hat Enterprise Linux 10rubyFix deferred
Red Hat Enterprise Linux 8ruby:3.3/rubyFix deferred
Red Hat Enterprise Linux 9ruby:3.3/rubyFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-43857.

Attack patterns (CAPEC)

  • CAPEC-147 XML Ping of the Death Likelihood: Low · Severity: Medium
  • CAPEC-227 Sustained Client Engagement
  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-770 (20).

References

Check your stackJSON