Vulnerability in ruby-net-imap (ALPINE-CVE-2025-43857)
Summary
Vulnerability in ruby-net-imap (ALPINE-CVE-2025-43857). Risk of unauthorized operations or information disclosure. Mitigation: upgrade to 0.4.22-r0 or later.
Original description
The description as published by the source.
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.
Source: OSV.dev (Open Source Vulnerabilities) OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as ALPINE-CVE-2025-43857 has been found in ruby-net-imap.
Risk of unauthorized operations or information disclosure.
What to do: upgrade ruby-net-imap to 0.4.22-r0 or later.
If unsure, ask your IT team or search "ruby-net-imap ALPINE-CVE-2025-43857" on the vendor's site.
ALPINE-CVE-2025-43857 (ruby-net-imap)
Attack vector: remote (network-reachable) / unauthenticated
Patched: 0.4.22-r0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (unclassified) exists in ruby-net-imap.
Check the vendor advisory for the affected versions of ruby-net-imap.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 0.4.22-r0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'ruby-net-imap' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'ruby-net-imap' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
ruby-net-imapを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade ruby-net-imap to 0.4.22-r0ステージング環境で 0.4.22-r0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory security.alpinelinux.org