CVE-2025-43857: ruby net-imap Uncontrolled Resource Consumption
Vulnerability summary
CVE-2025-43857 is a medium (CVSS 6.5) Uncontrolled Resource Consumption vulnerability in ruby net-imap. EPSS estimates a 0.49% chance of exploitation in the next 30 days, higher than 40.5% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 2Timeline
- 28-04-2025PublishedVulnerability first disclosed.
- 28-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
10 scores · 8 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated6.0MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- OSV · WolfiEcosystem advisory · calculated6.0MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- OSV · ChainguardEcosystem advisory · calculated6.0MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- OSV · RubygemsEcosystem advisory · calculated6.0MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- NVDNIST6.0MediumCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · AlpineEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.49%
Chance of exploitation in the next 30 days
Percentile
41%
Versus all other CVEs
30-day change
+0.02 pp
From 0.47% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource.
- CWE-405Asymmetric Resource Consumption (Amplification)The product does not properly control situations in which an adversary can cause the product to consume or produce excessive resources without requiring the adversary to invest equivalent work or otherwise prove authorization, i.e., the adversary's influence is "asymmetric."
- CWE-770Allocation of Resources Without Limits or ThrottlingThe product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
- CWE-789Memory Allocation with Excessive Size ValueThe product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.
Affected systems
Chainguard15 products
- gitlab-rails-ce-18.1All versions (No fix recorded)
- gitlab-rails-ce-18.2All versions (No fix recorded)
- gitlab-rails-ce-fips-18.1All versions (No fix recorded)
- gitlab-rails-ce-fips-18.2All versions (No fix recorded)
- graalvm-24-trufflerubyAll versions (No fix recorded)
Wolfi9 products
- jruby-9.4< 9.4.13.0-r0
- jruby-9.4-default-ruby< 9.4.13.0-r0
- kube-fluentd-operator< 1.18.2-r36
- kube-fluentd-operator-compat< 1.18.2-r36
- kube-fluentd-operator-default-config< 1.18.2-r36
Ubuntu6 products
- jrubyAll versions (No fix recorded)
- ruby2.5All versions (No fix recorded)
- ruby2.7All versions (No fix recorded)
- ruby3.0All versions (No fix recorded)
- ruby3.2All versions (No fix recorded)
Debian2 products
- ruby3.1All versions (No fix recorded)
- ruby3.3All versions (No fix recorded)
Alpine1 product
- ruby-net-imap< 0.4.22-r0
Ruby1 product
- net-imap≥ 0.5.0, < 0.5.7 | ≥ 0.4.0, < 0.4.20 | ≥ 0.3.0, < 0.3.9 | < 0.2.5
RubyGems1 product
- net-imap≥ 0.5.0, < 0.5.7 | ≥ 0.4.0, < 0.4.20 | ≥ 0.3.0, < 0.3.9 | < 0.2.5
7 vendors · 35 products
References
15 links- github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mjX Refsource CONFIRMREPORTAdvisoryWEBVendor Advisory
- github.com/ruby/net-imap/pull/444/commits/0ae8576c1a90bcd9573f81bdad4b4b824642d105X Refsource MISCWEBPatch
Show all 15 references
- github.com/ruby/net-imapPACKAGE