Vulnerability · Published Jun 22, 2026 · Assigned by GitHub_M

CVE-2026-47240Net::IMAP: Command Injection via non-synchronizing literal in "raw" argument

Medium 5.8

In plain English

A medium-severity command injection in net-imap from ruby. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 58% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)5.8Medium
Exploit odds (30 days)0.8%top 42.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to 0.6.5 and 0.5.15, several Net::IMAP commands accept a "raw data" argument that is sent verbatim after validation to prevent command injection. However, if a server does not support non-synchronizing literals, it may still be possible to inject arbitrary IMAP commands inside non-synchronizing literals. A server without support for non-synchronizing literals may interpret the "+}\r\n" as the end of a malformed command line and respond with a tagged BAD. In that case, the contents of the literal will be interpreted as one or more new pipelined commands, allowing a CRLF command injection attack to succeed. This affects criteria for #search and #uid_search; search_keys for #sort, #thread, #uid_sort, and #uid_thread; and attr for #fetch and #uid_fetch. This vulnerability is fixed in 0.6.5 and 0.5.15.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10ruby3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9ruby4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10ruby-bundled-gems3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-bundled-gems3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-bundled-gems3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9ruby-bundled-gems4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10ruby-default-gems3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-default-gems3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-default-gems3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9ruby-default-gems4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10ruby-devel3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-devel3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-devel4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9ruby-devel3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10ruby-doc3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-doc3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-doc4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9ruby-doc3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10ruby-libs3.3.12-14.el10_2ALSA-2026:50778
AlmaLinux:8ruby-libs3.3.12-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9ruby-libs4.0.6-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9ruby-libs3.3.12-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10ruby4.04.0.6-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-devel4.0.6-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-doc4.0.6-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-rubygem-mysql20.5.7-36.el10_2ALSA-2026:50773
AlmaLinux:10ruby4.0-rubygem-pg1.6.3-36.el10_2ALSA-2026:50773
AlmaLinux:8rubygem-abrt0.4.0-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:8rubygem-abrt-doc0.4.0-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:10rubygem-bigdecimal3.1.5-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-bigdecimal3.1.5-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-bigdecimal3.1.5-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-bigdecimal4.0.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-bundler2.5.22-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-bundler2.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-bundler2.5.22-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-bundler4.0.16-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-io-console0.7.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-io-console0.7.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-io-console0.8.2-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-io-console0.7.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-irb1.13.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-irb1.13.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-irb1.13.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-irb1.16.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-json2.7.2-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-json2.7.2-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-json2.18.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-json2.7.2-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-minitest5.20.0-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-minitest5.20.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-minitest6.0.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-minitest5.20.0-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:8rubygem-mysql20.5.5-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-mysql20.5.5-3.module_el9.7.0+184+e2e36072ALSA-2026:50828
AlmaLinux:9rubygem-mysql20.5.7-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:8rubygem-mysql2-doc0.5.5-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-mysql2-doc0.5.7-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:9rubygem-mysql2-doc0.5.5-3.module_el9.7.0+184+e2e36072ALSA-2026:50828
AlmaLinux:8rubygem-pg1.5.4-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-pg1.6.3-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:9rubygem-pg1.5.4-2.module_el9.7.0+245+447713a2ALSA-2026:50828
AlmaLinux:8rubygem-pg-doc1.5.4-1.module_el8.10.0+3799+191214ccALSA-2026:50728
AlmaLinux:9rubygem-pg-doc1.6.3-1.module_el9.8.0+232+50f6dd36ALSA-2026:50827
AlmaLinux:9rubygem-pg-doc1.5.4-2.module_el9.7.0+245+447713a2ALSA-2026:50828
AlmaLinux:10rubygem-power_assert2.0.3-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-power_assert2.0.3-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-power_assert2.0.3-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-power_assert3.0.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-psych5.1.2-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-psych5.1.2-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-psych5.3.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-psych5.1.2-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-racc1.7.3-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-racc1.7.3-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-racc1.7.3-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-racc1.8.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-rake13.1.0-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rake13.1.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rake13.3.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-rake13.1.0-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-rbs3.4.0-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rbs3.4.0-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rbs3.10.0-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:9rubygem-rbs3.4.0-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:10rubygem-rdoc6.6.3.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rdoc6.6.3.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rdoc6.6.3.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-rdoc7.0.4-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-rexml3.4.4-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rexml3.4.4-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rexml3.4.4-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-rexml3.4.4-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-rss0.3.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-rss0.3.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-rss0.3.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-rss0.3.2-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-test-unit3.6.1-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-test-unit3.6.1-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-test-unit3.6.1-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-test-unit3.7.5-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygem-typeprof0.21.9-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygem-typeprof0.21.9-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygem-typeprof0.21.9-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygem-typeprof0.31.1-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygems3.5.22-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygems3.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygems3.5.22-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygems4.0.16-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
AlmaLinux:10rubygems-devel3.5.22-14.el10_2ALSA-2026:50778
AlmaLinux:8rubygems-devel3.5.22-8.module_el8.10.0+4241+4264e34bALSA-2026:50728
AlmaLinux:9rubygems-devel3.5.22-8.module_el9.8.0+288+22f1c9f2ALSA-2026:50828
AlmaLinux:9rubygems-devel4.0.16-34.module_el9.8.0+289+5a070f48ALSA-2026:50827
Alpine:v3.21ruby-net-imap0.4.25-r0ALPINE-CVE-2026-47240
Alpine:v3.22ruby-net-imap0.5.15-r0ALPINE-CVE-2026-47240
Alpine:v3.23ruby-net-imap0.5.15-r0ALPINE-CVE-2026-47240
Alpine:v3.24ruby-net-imap0.5.15-r0ALPINE-CVE-2026-47240
Debian:12ruby3.1no fix listedDEBIAN-CVE-2026-47240
Debian:13ruby3.3no fix listedDEBIAN-CVE-2026-47240
Debian:14ruby3.3no fix listedDEBIAN-CVE-2026-47240
Rocky Linux:10ruby0:3.3.12-14.el10_2RLSA-2026:50778
Rocky Linux:8ruby0:3.3.12-8.module+el8.10.0+40269+dc93e2d1RLSA-2026:50728
Rocky Linux:9ruby0:3.3.12-8.module+el9.8.0+40270+7a73441eRLSA-2026:50828
Rocky Linux:9ruby0:4.0.6-34.module+el9.8.0+40271+b5850c84RLSA-2026:50827
Rocky Linux:10ruby4.00:4.0.6-36.el10_2RLSA-2026:50773
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1741+bdb5b6caRLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1820+f3fffb92RLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.9.0+1537+0b2034bdRLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.5.0+668+665814faRLSA-2026:50728
Rocky Linux:8rubygem-abrt0:0.4.0-1.module+el8.10.0+1826+b62220b4RLSA-2026:50728
Rocky Linux:8rubygem-mysql20:0.5.5-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux:8rubygem-mysql20:0.5.5-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux:9rubygem-mysql20:0.5.7-1.module+el9.8.0+40094+ce01217cRLSA-2026:50827
Rocky Linux:9rubygem-mysql20:0.5.5-3.module+el9.7.0+40032+36e56d0dRLSA-2026:50828
Rocky Linux:8rubygem-pg0:1.5.4-1.module+el8.10.0+1827+16ecb9d2RLSA-2026:50728
Rocky Linux:8rubygem-pg0:1.5.4-1.module+el8.10.0+1679+61871737RLSA-2026:50728
Rocky Linux:9rubygem-pg0:1.5.4-2.module+el9.7.0+40188+314ad260.0.1RLSA-2026:50828
Rocky Linux:9rubygem-pg0:1.6.3-1.module+el9.8.0+40094+ce01217cRLSA-2026:50827
RubyGemsnet-imap0.6.4.1GHSA-8p34-64r3-mwg8
RubyGemsnet-imap0.5.15GHSA-8p34-64r3-mwg8
Ubuntu:24.04:LTSjrubyno fix listedUBUNTU-CVE-2026-47240
Ubuntu:25.10jrubyno fix listedUBUNTU-CVE-2026-47240
Ubuntu:26.04:LTSjrubyno fix listedUBUNTU-CVE-2026-47240
Ubuntu:26.10jrubyno fix listedUBUNTU-CVE-2026-47240
Ubuntu:22.04:LTSruby3.0no fix listedUBUNTU-CVE-2026-47240
Ubuntu:24.04:LTSruby3.2no fix listedUBUNTU-CVE-2026-47240
Ubuntu:25.10ruby3.3no fix listedUBUNTU-CVE-2026-47240
Ubuntu:26.04:LTSruby3.3no fix listedUBUNTU-CVE-2026-47240
Ubuntu:26.10ruby3.3no fix listedUBUNTU-CVE-2026-47240

Affected products (as reported)

VendorProductVersions
ruby net-imap >= 0.6.0, < 0.6.4.1< 0.5.15

Weakness: CWE-77, CWE-93 · Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

References