CVE-2026-42257: net-imap: Command Injection via "raw" arguments to multiple commands
Vulnerability summary
CVE-2026-42257 is a critical (CVSS 9.8) vulnerability in ruby net-imap. EPSS estimates a 0.43% chance of exploitation in the next 30 days, higher than 39% of scored vulnerabilities.
Not severe (CVSS 5.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 13 · Related 3Timeline
- 09-05-2026PublishedVulnerability first disclosed.
- 13-05-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
10 scores · 8 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated5.8MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
- OSV · WolfiEcosystem advisory · calculated5.8MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
- OSV · ChainguardEcosystem advisory · calculated5.8MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
- OSV · RubygemsEcosystem advisory · calculated5.8MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
- NVDNIST5.8MediumCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/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
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.43%
Chance of exploitation in the next 30 days
Percentile
39%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.43% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-77Improper Neutralization of Special Elements used in a CommandThe product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
- CWE-93Improper Neutralization of CRLF SequencesThe product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.
Affected systems
Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard60 products
- gitlab-rails-ce-18.1< 18.1.6-r10
- gitlab-rails-ce-18.10< 18.10.5-r1
- gitlab-rails-ce-18.11< 18.11.3-r1
- gitlab-rails-ce-18.3All versions (No fix recorded)
- gitlab-rails-ce-18.4All versions (No fix recorded)
Wolfi16 products
- jruby-10.1< 10.1.1.0-r1
- jruby-9.4< 9.4.15.0-r2
- kube-fluentd-operator< 1.18.2-r70
- logstash-9.3< 9.3.4-r1
- logstash-9.3-iamguarded-compat< 9.3.4-r1
Ubuntu7 products
- jrubyAll versions (No fix recorded)
- ruby2.3< 2.3.1-2~ubuntu16.04.16+esm14
- ruby2.5< 2.5.1-1ubuntu1.16+esm8
- ruby2.7< 2.7.0-5ubuntu1.18+esm5
- ruby3.0< 3.0.2-7ubuntu2.13
Debian2 products
- ruby3.1All versions (No fix recorded)
- ruby3.3All versions (No fix recorded) | < 3.3.13-0+deb13u1 | < 3.3.14-0.1
Alpine1 product
- ruby-net-imap< 0.4.25-r0
Ruby1 product
- net-imap< 0.4.24 | ≥ 0.5.0, < 0.5.14 | ≥ 0.6.0, < 0.6.4
RubyGems1 product
- net-imap≥ 0.6.0, < 0.6.4 | ≥ 0.5.0, < 0.5.14 | < 0.4.24
7 vendors · 88 products
References
19 links- github.com/ruby/net-imap/security/advisories/GHSA-hm49-wcqc-g2xgX Refsource CONFIRMREPORTAdvisoryWEBMitigationVendor Advisory
Show all 19 references
- github.com/ruby/net-imapPACKAGE