CVEfocus › CVE database › CVE-2025-43857

CVE-2025-43857net-imap rubygem vulnerable to possible DoS by memory exhaustion

CVSS 6.0 MediumEPSS 0.9% (higher than 57% of CVEs)Published 2025-04-28Updated 2025-04-28Assigner: GitHub_M

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.

CWE-400CWE-405CWE-770CWE-789

What to do

Fixed builds are available from Alpine, RubyGems: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
99Fix pending
2Under investigation
3Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10jrubyFix pendingUBUNTU-CVE-2025-43857
Ubuntu 26.10ruby3.3Fix pendingUBUNTU-CVE-2025-43857
Ubuntu 26.04jrubyUnder investigationUBUNTU-CVE-2025-43857
Ubuntu 26.04ruby3.3Fix pendingUBUNTU-CVE-2025-43857
Ubuntu 25.10jrubyWill not fix
ruby3.0 contains net-imap 0.1.1 ruby3.2 contains net-imap 0.3.4.1 ruby3.3 contains net-imap 0.4.9.1 This fix introduces a new max_response_size to the API,…
UBUNTU-CVE-2025-43857
Ubuntu 25.10ruby3.3Will not fix
ruby3.0 contains net-imap 0.1.1 ruby3.2 contains net-imap 0.3.4.1 ruby3.3 contains net-imap 0.4.9.1 This fix introduces a new max_response_size to the API,…
UBUNTU-CVE-2025-43857
Ubuntu 24.04jrubyUnder investigationUBUNTU-CVE-2025-43857
Ubuntu 24.04ruby3.2Fix pendingUBUNTU-CVE-2025-43857
Ubuntu 22.04ruby3.0Fix pendingUBUNTU-CVE-2025-43857
Ubuntu 20.04jrubyWill not fix
ruby3.0 contains net-imap 0.1.1 ruby3.2 contains net-imap 0.3.4.1 ruby3.3 contains net-imap 0.4.9.1 This fix introduces a new max_response_size to the API,…
UBUNTU-CVE-2025-43857
Ubuntu 20.04ruby2.7Fix pendingUBUNTU-CVE-2025-43857
Ubuntu 18.04jrubyFix pendingUBUNTU-CVE-2025-43857
Ubuntu 18.04ruby2.5Fix pendingUBUNTU-CVE-2025-43857
Ubuntu 16.04jrubyFix pendingUBUNTU-CVE-2025-43857
Ubuntu 14.04jrubyFix pendingUBUNTU-CVE-2025-43857
Debian 14ruby3.3Fix pendingDEBIAN-CVE-2025-43857
Debian 13ruby3.3Fix pendingDEBIAN-CVE-2025-43857
Debian 12ruby3.1Fix pendingDEBIAN-CVE-2025-43857
Red Hat Enterprise Linux 10rubyFix pending
Fix deferred
Red Hat Enterprise Linux 10ruby-bundled-gemsFix pending
Fix deferred
Red Hat Enterprise Linux 10ruby-default-gemsFix pending
Fix deferred
Red Hat Enterprise Linux 10ruby-develFix pending
Fix deferred
Red Hat Enterprise Linux 10ruby-docFix pending
Fix deferred
Red Hat Enterprise Linux 10ruby-libsFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-bigdecimalFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-bundlerFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-io-consoleFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-irbFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-jsonFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-minitestFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-power_assertFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-psychFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-raccFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-rakeFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-rbsFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-rdocFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-rexmlFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-rssFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-test-unitFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygem-typeprofFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygemsFix pending
Fix deferred
Red Hat Enterprise Linux 10rubygems-develFix pending
Fix deferred
Red Hat Enterprise Linux 9rubyFix pending
Fix deferred
Red Hat Enterprise Linux 9ruby-default-gemsFix pending
Fix deferred
Red Hat Enterprise Linux 9ruby-develFix pending
Fix deferred
Red Hat Enterprise Linux 9ruby-docFix pending
Fix deferred
Red Hat Enterprise Linux 9ruby-libsFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-bigdecimalFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-bundlerFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-io-consoleFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-irbFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-jsonFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-minitestFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-power_assertFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-psychFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-rakeFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-rbsFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-rdocFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-rexmlFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-rssFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-test-unitFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygem-typeprofFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygemsFix pending
Fix deferred
Red Hat Enterprise Linux 9rubygems-develFix pending
Fix deferred
Red Hat Enterprise Linux 8rubyFix pending
Fix deferred
Red Hat Enterprise Linux 8ruby-bundled-gemsFix pending
Fix deferred
Red Hat Enterprise Linux 8ruby-default-gemsFix pending
Fix deferred
Red Hat Enterprise Linux 8ruby-develFix pending
Fix deferred
Red Hat Enterprise Linux 8ruby-docFix pending
Fix deferred
Red Hat Enterprise Linux 8ruby-irbFix pending
Fix deferred
Red Hat Enterprise Linux 8ruby-libsFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-abrtFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-abrt-docFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-bigdecimalFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-bsonFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-bson-docFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-bundlerFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-bundler-docFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-did_you_meanFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-io-consoleFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-irbFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-jsonFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-minitestFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-mongoFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-mongo-docFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-mysql2Fix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-mysql2-docFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-net-telnetFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-opensslFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-pgFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-pg-docFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-power_assertFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-psychFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-raccFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-rakeFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-rbsFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-rdocFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-rexmlFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-rssFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-test-unitFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-typeprofFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygem-xmlrpcFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygemsFix pending
Fix deferred
Red Hat Enterprise Linux 8rubygems-develFix pending
Fix deferred
Alpine Linux 3.21ruby-net-imapFixed0.4.22-r0ALPINE-CVE-2025-43857
Alpine Linux 3.20ruby-net-imapFixed0.4.22-r0ALPINE-CVE-2025-43857
RubyGems librarynet-imapFixed0.5.7GHSA-j3g3-5qv5-52mj

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.