CVE-2025-43857

NameCVE-2025-43857
DescriptionNet::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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1104486

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
ruby3.1 (PTS)bookworm, bookworm (security)3.1.2-7+deb12u1vulnerable
ruby3.3 (PTS)trixie3.3.8-1vulnerable
sid3.3.8-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
ruby3.1source(unstable)(unfixed)
ruby3.3source(unstable)(unfixed)1104486

Notes

[bookworm] - ruby3.1 <no-dsa> (Minor issue)
https://github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mj
https://github.com/ruby/net-imap/pull/444
Fixed by: https://github.com/ruby/net-imap/commit/0ae8576c1a90bcd9573f81bdad4b4b824642d105 (v0.5.7)
Fixed by: https://github.com/ruby/net-imap/commit/b6bdee27a5cd38dd386042f43fec160840fe7562 (v0.5.7)
https://github.com/ruby/net-imap/pull/445
Fixed by: https://github.com/ruby/net-imap/commit/ddcaabd4fecbd1b0d4b3202bc1befed685d06562 (v0.4.20)
Fixed by: https://github.com/ruby/net-imap/commit/19bea631c31b82798a4047ac3a6737a41054e45a (v0.4.20)
Fixed by: https://github.com/ruby/net-imap/commit/641c4c451e7c35f72726f7b19342c6de4143977c (v0.4.20)
https://github.com/ruby/net-imap/pull/446
Fixed by: https://github.com/ruby/net-imap/commit/53ceba1e97cbc3ac4d141077732178cc8bc79476 (v0.3.9)
Fixed by: https://github.com/ruby/net-imap/commit/158cfdff54f3961b0ec628136444e3b0b0bb1736 (v0.3.9)
Fixed by: https://github.com/ruby/net-imap/commit/ae0fa010bb5e3c95b9beee31af607d4dba619d63 (v0.3.9)
Fixed by: https://github.com/ruby/net-imap/commit/e0059251e854cb03d5209c682ba3484fcb6953cd (v0.3.9)
https://github.com/ruby/net-imap/pull/447
Fixed by: https://github.com/ruby/net-imap/commit/20c16a2eaec1dc6775675abbd8f3f2c412e7533f (v0.2.5)
Fixed by: https://github.com/ruby/net-imap/commit/5431e16b779254ad7b2786e4367bc04328418264 (v0.2.5)
Fixed by: https://github.com/ruby/net-imap/commit/450bb4d757d9b9f2866ebd6e1efdd5d94a311b05 (v0.2.5)
Fixed by: https://github.com/ruby/net-imap/commit/673cab874374670fca850dc0e16ddc62ee3b8a68 (v0.2.5)
Net::IMAP embedded in src:ruby* source package

Search for package or bug name: Reporting problems