CVE-2025-43857
Fixed in a distro release EPSS <1%CVSS 6.0
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.
Products: ruby net-imap
Fixed upstream
| Ecosystem | Package | Fixed in |
|---|---|---|
| RubyGems | net-imap | 0.5.7 |
| RubyGems | net-imap | 0.4.20 |
| RubyGems | net-imap | 0.3.9 |
| RubyGems | net-imap | 0.2.5 |
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Alpine 3.20 | ruby-net-imap | 0.4.22-r0 |
| Alpine 3.21 | ruby-net-imap | 0.4.22-r0 |
| Chainguard | gitlab-rails-ce-18.1 | no fix |
| Chainguard | gitlab-rails-ce-18.2 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.1 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.2 | no fix |
| Chainguard | graalvm-24-truffleruby | no fix |
| Chainguard | jruby-9.4 | 9.4.13.0-r0 |
| Chainguard | jruby-9.4-default-ruby | 9.4.13.0-r0 |
| Chainguard | kube-fluentd-operator | 1.18.2-r36 |
| Chainguard | kube-fluentd-operator-compat | 1.18.2-r36 |
| Chainguard | kube-fluentd-operator-default-config | 1.18.2-r36 |
| Chainguard | kube-fluentd-operator-oci-entrypoint | 1.18.2-r36 |
| Chainguard | logstash-8-with-output-opensearch | no fix |
| Chainguard | ruby-3.1 | no fix |
| Chainguard | ruby-3.1-dev | no fix |
| Chainguard | truffleruby | 34.0.1-r0 |
| Debian 12 | ruby3.1 | no fix |
| Debian 13 | ruby3.3 | no fix |
| Debian 14 | ruby3.3 | no fix |
| Ubuntu 16.04 LTS | jruby | no fix |
| Ubuntu 18.04 LTS | jruby | no fix |
| Ubuntu 20.04 LTS | jruby | no fix |
| Ubuntu 22.04 LTS | ruby3.0 | no fix |
| Ubuntu 24.04 LTS | jruby | no fix |
| Ubuntu 24.04 LTS | ruby3.2 | no fix |
| Ubuntu 25.10 | jruby | no fix |
| Ubuntu 25.10 | ruby3.3 | no fix |
| Ubuntu 26.04 LTS | jruby | no fix |
| Ubuntu 26.04 LTS | ruby3.3 | no fix |
| Ubuntu 26.10 | jruby | no fix |
| Ubuntu 26.10 | ruby3.3 | no fix |
| Ubuntu Pro 14.04 LTS | jruby | no fix |
| Ubuntu Pro 18.04 LTS | ruby2.5 | no fix |
| Ubuntu Pro 20.04 LTS | ruby2.7 | no fix |
| Wolfi | jruby-9.4 | 9.4.13.0-r0 |
| Wolfi | jruby-9.4-default-ruby | 9.4.13.0-r0 |
| Wolfi | kube-fluentd-operator | 1.18.2-r36 |
| Wolfi | kube-fluentd-operator-compat | 1.18.2-r36 |
| Wolfi | kube-fluentd-operator-default-config | 1.18.2-r36 |
| Wolfi | kube-fluentd-operator-oci-entrypoint | 1.18.2-r36 |
| Wolfi | logstash-8-with-output-opensearch | no fix |
| Wolfi | ruby-3.1 | no fix |
| Wolfi | ruby-3.1-dev | no fix |