net-imap rubygem vulnerable to possible DoS by memory exhaustion (ruby net-imap)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.49 % · percentile 42 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
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.
Weaknesses (CWE)
- CWE-400 — Uncontrolled Resource Consumption
- CWE-770 — Allocation of Resources Without Limits or Throttling
- CWE-789 — Memory Allocation with Excessive Size Value
- CWE-405 — Asymmetric Resource Consumption (Amplification)
References
- https://github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mj
- https://github.com/ruby/net-imap/pull/442
- https://github.com/ruby/net-imap/pull/444/commits/0ae8576c1a90bcd9573f81bdad4b4b824642d105#diff-53721cb4d9c3fb86b95cc8476ca2df90968ad8c481645220c607034399151462
- https://github.com/ruby/net-imap/pull/445
- https://github.com/ruby/net-imap/pull/446
- https://github.com/ruby/net-imap/pull/447
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 4.0 | MEDIUM 6.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | GitHub_M |
| CVSS 4.0 | MEDIUM 6.0 | CVSS: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 | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-j3g3-5qv5-52mj — net-imap rubygem vulnerable to possible DoS by memory exhaustion
European references
- ENISA EUVD · EUVD-2025-12559
- GCVE · GCVE-0-2025-43857
CERT-FR advisories
- CERTFR-2026-AVI-1352 — Multiples vulnérabilités dans Oracle PeopleSoft · cert.ssi.gouv.fr
- CERTFR-2026-AVI-0199 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
- CERTFR-2025-AVI-1129 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0969 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
- CERTFR-2025-AVI-0756 — Multiples vulnérabilités dans les produits VMware · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:ruby-lang:net\:\:imap:*:*:*:*:*:ruby:*:*< 0.2.5cpe:2.3:a:ruby-lang:net\:\:imap:*:*:*:*:*:ruby:*:*≥ 0.3.0 < 0.3.9cpe:2.3:a:ruby-lang:net\:\:imap:*:*:*:*:*:ruby:*:*≥ 0.4.0 < 0.4.20cpe:2.3:a:ruby-lang:net\:\:imap:*:*:*:*:*:ruby:*:*≥ 0.5.0 < 0.5.7
Affected products
| Product | Versions |
|---|---|
| ruby · net-imap | affected >= 0.5.0, < 0.5.7 ; affected >= 0.4.0, < 0.4.20 ; affected >= 0.3.0, < 0.3.9 ; affected >= 0, < 0.2.5 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |