CVE-2025-43857
published medium CVSS 4.0 · 6.0net-imap rubygem vulnerable to possible DoS by memory exhaustion
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| 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 | Affected | Not stated | GitHub_M |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1168 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | v3.20 | ruby-net-imap | Fixed | 0.4.22-r0 | Package fix record |
| Amazon Linux | AL2023 | ruby3.2aarch64 | Listed in advisory | Not stated | ALAS2023-2025-1168 |
| Alpine Linux | v3.21 | ruby-net-imap | Fixed | 0.4.22-r0 | Package fix record |
| Amazon Linux | AL2023 | ruby3.2noarch | Listed in advisory | Not stated | ALAS2023-2025-1168 |
| Amazon Linux | AL2023 | ruby3.2src | Listed in advisory | Not stated | ALAS2023-2025-1168 |
Show 1 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Amazon Linux | AL2023 | ruby3.2x86_64 | Listed in advisory | Not stated | ALAS2023-2025-1168 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.0 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| ruby | net-imap | >= 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 (affected) | GitHub_M · cna |
Weaknesses
4- CWE-400 CWE-400: Uncontrolled Resource Consumption
- CWE-770 CWE-770: Allocation of Resources Without Limits or Throttling
- CWE-789 CWE-789: Memory Allocation with Excessive Size Value
- CWE-405 CWE-405: Asymmetric Resource Consumption (Amplification)
References
6- 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
- https://github.com/ruby/net-imap/security/advisories/GHSA-j3g3-5qv5-52mj
Provider assertions
2GitHub_M · cna
net-imap rubygem vulnerable to possible DoS by memory exhaustion
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 0e2dcf3e74933b45b66122ca0f43d83f165fb3d985e1f2ec375dbfb63f538c90
- Ingested
- 23 Sep 2026, 08:49:03 UTC
- Source record
- Official CVE record