# CVE-2026-42257: net-imap: Command Injection via "raw" arguments to multiple commands

- Priority: **Routine**
- Reason: Not severe (CVSS 5.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-09 · Modified: 2026-05-13
- Aliases: UBUNTU-CVE-2026-42257, DEBIAN-CVE-2026-42257, CGA-2c3h-vr82-mrx9, CGA-2c3p-5r4g-rccc, CGA-2qgf-69r9-j676, CGA-3wfv-48rx-6vg4, CGA-4v2p-rx5q-pwwm, CGA-4x88-5qc3-m67v, CGA-59qp-whr2-gxvg, CGA-5rmc-p74j-5vxp, CGA-6f62-3gwf-4v5f, CGA-6ghv-hcjm-6cpj, CGA-6gj9-pqcp-r43v, CGA-6m5m-9qff-5qff, CGA-737q-5hvw-gr8g, CGA-7vpj-q2g7-x95w, CGA-85ch-xf79-j952, CGA-89vx-gjqc-q7pw, CGA-94xx-v8vg-g4c9, CGA-c8w9-3fc9-w35w, CGA-fhr3-6vc4-r9rj, CGA-j4p4-wx8c-wchp, CGA-jffm-5hg2-32cj, CGA-jhmc-8w89-ccqj, CGA-mv7f-x7fj-6xhx, CGA-p4m8-76v6-29rg, CGA-qc79-j79p-x394, CGA-qg43-f46x-jcph, CGA-rfvc-hxrv-r7ww, CGA-rmw8-wr66-8xcv, CGA-rvvv-m82q-g92q, CGA-x6cv-wwmq-cx7m, CGA-xrh7-rm44-3h39, CGA-xv2h-cvx3-rchv, CGA-23hp-f396-fhj4, CGA-2579-rvj9-j3qm, CGA-2f88-489m-27r5, CGA-2x5j-g26q-rh7w, CGA-35fm-wr5x-wc77, CGA-36vr-2pjm-jvqm, CGA-3f79-hj2f-jqhr, CGA-3fcf-hf5j-89hr, CGA-3ghg-4jgg-jw6f, CGA-3grj-xvmm-ff2g, CGA-3pp8-p27q-6qv7, CGA-3vm6-7v9x-v2fx, CGA-3xp3-mggx-vj7p, CGA-428j-cvq4-v5f3, CGA-43mq-gw98-v2qh, CGA-4j7x-96g3-q9c4, CGA-4m7x-4wx5-fjw4, CGA-4mfh-wqrw-gfrr, CGA-4qw7-5f4p-rvp3, CGA-4w6j-3q5p-p8vj, CGA-57j6-p984-h65j, CGA-5cr6-33wj-2h79, CGA-5f6r-x4f5-28h2, CGA-5vvv-6vc9-475r, CGA-67f5-wf32-2jrw, CGA-67pv-5cww-9v93, CGA-6h85-cw5f-hfqj, CGA-6v7p-7hf6-jpgj, CGA-7gcv-j329-964m, CGA-7gjj-386h-wwg8, CGA-7hj9-43jf-5gvp, CGA-7j8f-rc8q-hc7f, CGA-84hq-j9v9-3596, CGA-8p6m-97q9-75hg, CGA-8q58-7m33-rq7h, CGA-9c6h-67jx-frx4, CGA-9fjj-mgxm-gr66, CGA-9rqv-334p-x8x7, CGA-9x43-6v4m-385g, CGA-c42p-3q43-jw23, CGA-c4wp-9rw5-fmrf, CGA-c62q-g993-5jxq, CGA-c6cx-r9mv-29pr, CGA-c8vq-93pw-fjvp, CGA-c945-w8mr-wq9f, CGA-c95r-c6fx-v6fc, CGA-cfjq-v8v4-5f5h, CGA-cw64-x6xh-3rh4, CGA-fj58-39cp-jmh9, CGA-fj7p-c344-h5xj, CGA-fx2f-vmpw-g9jm, CGA-gcf9-rpj5-v2jx, CGA-gh36-jm4w-v237, CGA-ghr5-5phh-pw55, CGA-gpqr-r6vp-538j, CGA-gvwf-6gpv-5m2g, CGA-gw39-8fqj-6x3m, CGA-gwfx-hpv8-5hv7, CGA-h85g-vx7r-m2q5, CGA-hg3q-p898-j35q, CGA-hpjf-p64x-2cm8, CGA-jhw4-8qc4-22c3, CGA-jrfp-m49c-w4r6, CGA-jrjx-56cc-92f4, CGA-jrwh-f4x7-73hh, CGA-jw2x-vqp3-5mrr, CGA-mhmj-8cmp-5g6q, CGA-p96h-mv2j-8p65, CGA-pc8v-q37w-79jg, CGA-pc9w-vwr5-7g8q, CGA-pfp9-wmwf-8j6h, CGA-pjr4-636p-cj54, CGA-ppjq-5q3q-cv7w, CGA-pr6j-x38x-7gw5, CGA-prfj-3j43-ffh6, GHSA-hm49-wcqc-g2xg, CGA-q3xc-p7wr-j3hp, CGA-qj23-j8hv-2rr3, CGA-qq4p-h44p-h8fw, CGA-qrc8-43q6-54jq, CGA-qxh3-6rm6-gv9v, CGA-r4cx-wv9p-w59g, CGA-r96r-w8qj-j52j, CGA-r97v-p35g-wpw8, CGA-r9wq-p7g6-684p, CGA-rhqc-jcfj-5mrc, CGA-rj26-99qj-q6pc, CGA-rp42-8mqh-5xxg, CGA-v364-974q-m2wp, CGA-v632-987g-9x37, CGA-v86p-5xh5-q9vf, CGA-vcc7-fpch-qv5h, CGA-vfmr-vvwr-r746, CGA-vhp8-x46c-f94p, CGA-vjx2-ph35-5rvp, CGA-w349-rj57-x3q4, CGA-whc4-88vw-7q7m, CGA-wpjj-rgj3-q486, CGA-wwvg-f824-fhmx, CGA-x3h6-7567-22qm, CGA-x3wx-xp5v-2fjq, CGA-x828-575m-4vqq, ALPINE-CVE-2026-42257
- Record: https://cvemate.com/vulnerability/CVE-2026-42257 · JSON: https://cvemate.com/vulnerability/CVE-2026-42257/json

## Description

```text
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to versions 0.4.24, 0.5.14, and 0.6.4, several Net::IMAP commands accept a raw string argument that is sent to the server without validation or escaping. If this string is derived from user-controlled input, it may contain contain CRLF sequences, which an attacker can use to inject arbitrary IMAP commands. This issue has been patched in versions 0.4.24, 0.5.14, and 0.6.4.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.429%, percentile 39.064%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 88)

- alpine ruby-net-imap (Alpine Linux): \< 0.4.25-r0
- chainguard gitlab-rails-ce-18.1 (Chainguard): \< 18.1.6-r10
- chainguard gitlab-rails-ce-18.10 (Chainguard): \< 18.10.5-r1
- chainguard gitlab-rails-ce-18.11 (Chainguard): \< 18.11.3-r1
- chainguard gitlab-rails-ce-18.3 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.4 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.6 (Chainguard): \< 18.6.6-r4
- chainguard gitlab-rails-ce-18.7 (Chainguard): \< 18.7.6-r3
- chainguard gitlab-rails-ce-18.8 (Chainguard): \< 18.8.9-r1
- chainguard gitlab-rails-ce-18.9 (Chainguard): \< 18.9.7-r2
- chainguard gitlab-rails-ce-fips-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.10 (Chainguard): \< 18.10.4-r1
- chainguard gitlab-rails-ce-fips-18.11 (Chainguard): \< 18.11.3-r2
- chainguard gitlab-rails-ce-fips-18.3 (Chainguard): \< 18.3.6-r7
- chainguard gitlab-rails-ce-fips-18.4 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.6 (Chainguard): \< 18.6.6-r4
- chainguard gitlab-rails-ce-fips-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.8 (Chainguard): All versions (No fix recorded)

## References

- <https://github.com/ruby/net-imap/security/advisories/GHSA-hm49-wcqc-g2xg>
- <https://github.com/ruby/net-imap/releases/tag/v0.4.24>
- <https://github.com/ruby/net-imap/releases/tag/v0.5.14>
- <https://github.com/ruby/net-imap/releases/tag/v0.6.4>
- <https://ubuntu.com/security/CVE-2026-42257>
- <https://www.cve.org/CVERecord?id=CVE-2026-42257>
- <https://ubuntu.com/security/notices/USN-8431-1>
- <https://ubuntu.com/security/notices/USN-8478-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-42257>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42257.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42257>
- <https://github.com/ruby/net-imap/commit/0ec4fd351263e8b9a4f683713427827b7b1ad974>
- <https://github.com/ruby/net-imap/commit/47c72186d272441878ca73c9499f66013829ca2f>
- <https://github.com/ruby/net-imap/commit/6bf02aef7e0b5931010c36e377f79a71636b306b>
- <https://github.com/ruby/net-imap/commit/a4f7649c3da77dec7631f03a037a478eb4330048>
- <https://github.com/ruby/net-imap/commit/aec06996eb87a7e1bbcef1f9f8926e8add2b8c71>
- <https://github.com/ruby/net-imap>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2026-42257.yml>
- <https://security.alpinelinux.org/vuln/CVE-2026-42257>

---

Data as of 2026-12-05T06:19:42.614Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
