← Back
CVE-2026-42257
critical
CVSS 9.8
Command Injection in net-imap (CVE-2026-42257)
Summary
command injection in net-imap (CVE-2026-42257). Successful exploitation can lead to full system takeover. Exploitable via ``CRLF``. Mitigation: upgrade to `0.4.24` or later.
AI summary snake-internal / snake-material-v2
A vulnerability tracked as **CVE-2026-42257** has been found in net-imap.
Attackers can target a specific entry point like ``CRLF`` over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 9.8/10.
What to do: upgrade net-imap to **0.4.24** or later.
If unsure, ask your IT team or search "net-imap CVE-2026-42257" on the vendor's site.
CVE-2026-42257 (net-imap) — CWE-77 / CVSS v3 9.8
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: `CRLF` / `astring` / `atom` / `quoted`
Patched: `0.4.24` — 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.
❓ What is the problem
**A vulnerability** (CWE-77) exists in net-imap. Attackers reach the vulnerable code path via ``CRLF`` without authentication.
📍 Affected scope
net-imap — . Attack surface: `CRLF` / `astring` / `atom` / `quoted`.
🔥 Severity
Severity: Critical (CVSS 9.8/10). Successful exploitation can lead to full system takeover
🔧 How to fix
Update to **0.4.24**.
🛡️ Workaround
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
🔍 Detection
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run `grep -r 'net-imap' .` against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response Actions (7 steps)
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'net-imap' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で `net-imap` を grep し、稼働しているサービス・バージョンを把握する。
-
6Apply patch patch
Upgrade net-imap to 0.4.24ステージング環境で 0.4.24 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。
-
7Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
rubygems
net-imap
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.4.24"}]}]
References
- package https://github.com/ruby/net-imap
- web https://github.com/ruby/net-imap/releases/tag/v0.4.24
- web https://github.com/ruby/net-imap/releases/tag/v0.5.14
- web https://github.com/ruby/net-imap/releases/tag/v0.6.4
- web https://github.com/ruby/net-imap/security/advisories/GHSA-hm49-wcqc-g2xg
- web https://github.com/ruby/net-imap/commit/0ec4fd351263e8b9a4f683713427827b7b1ad974
- web https://github.com/ruby/net-imap/commit/47c72186d272441878ca73c9499f66013829ca2f
- web https://github.com/ruby/net-imap/commit/6bf02aef7e0b5931010c36e377f79a71636b306b
- web https://github.com/ruby/net-imap/commit/a4f7649c3da77dec7631f03a037a478eb4330048
- web https://github.com/ruby/net-imap/commit/aec06996eb87a7e1bbcef1f9f8926e8add2b8c71
- web https://nvd.nist.gov/vuln/detail/CVE-2026-42257
- web https://github.com/advisories/GHSA-hm49-wcqc-g2xg
- web https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2026-42257.yml