Skip to content
OpenAdvisories

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.

Affected products

VendorProductAffectedFixed
ruby net-imap >= 0.5.0, < 0.5.7, >= 0.4.0, < 0.4.20, >= 0.3.0, < 0.3.9, >= 0, < 0.2.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby3.3 No fix yet —
Debian 13 ruby3.3 No fix yet —
Debian 12 ruby3.1 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 jruby +1 No fix yet —
Ubuntu 26.04 LTS jruby +1 No fix yet —
Ubuntu 25.10 jruby +1 No fix yet —
Ubuntu 24.04 LTS jruby +1 No fix yet —
Ubuntu 22.04 LTS ruby3.0 No fix yet —
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS jruby No fix yet —
Ubuntu 18.04 LTS jruby No fix yet —
Ubuntu 16.04 LTS jruby No fix yet —
Ubuntu Pro 20.04 LTS ruby2.7 No fix yet —
Ubuntu Pro 18.04 LTS ruby2.5 No fix yet —
Ubuntu Pro 14.04 LTS jruby No fix yet —
ReleasePackageFixed inAdvisory
Alpine v3.21 ruby-net-imap 0.4.22-r0 —
Alpine v3.20 ruby-net-imap 0.4.22-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 ruby3.2 +5 3.2.8-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-bigdecimal 3.1.3-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-bundler 2.4.19-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-io-console 0.6.0-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-irb 1.6.2-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-json 2.6.3-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-minitest 5.25.1-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-power_assert 2.0.3-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-psych 5.0.1-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-rake 13.0.6-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-rbs 2.8.2-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-rdoc 6.5.1.1-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-rexml 3.3.9-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-rss 0.3.1-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-test-unit 3.5.7-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygem-typeprof 0.21.3-184.amzn2023.0.5 ALAS2023-2025-1168
Amazon Linux 2023 ruby3.2-rubygems +1 3.4.19-184.amzn2023.0.5 ALAS2023-2025-1168

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling jruby-9.4 +1 9.4.13.0-r0 —
Wolfi rolling kube-fluentd-operator +3 1.18.2-r36 —
Wolfi rolling ruby-3.1 +2 No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems net-imap >= 0.5.0, < 0.5.7 0.5.7 GHSA-j3g3-5qv5-52mj
RubyGems net-imap >= 0.4.0, < 0.4.20 0.4.20 GHSA-j3g3-5qv5-52mj
RubyGems net-imap >= 0.3.0, < 0.3.9 0.3.9 GHSA-j3g3-5qv5-52mj
RubyGems net-imap < 0.2.5 0.2.5 GHSA-j3g3-5qv5-52mj

Advisories 2

References