Net::IMAP: Command Injection via ID command argument
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- None · High · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-77.
Summary
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to 0.6.5 and 0.5.15, when Net::IMAP#id is called with a hash argument, although the ID field value strings are correctly quoted (escaping quoted specials), they were not validated to prohibit CRLF sequences. While Net::IMAP#enable does process its arguments for aliases, it does not validate them as valid atoms (or as a list of valid atoms). The #to_s value is sent verbatim. Arguments to either command could be used by an attacker to inject arbitrary IMAP commands. This vulnerability is fixed in 0.6.5 and 0.5.15.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ruby | net-imap | 0.6.0 to before 0.6.4.1; before 0.5.15 | 0.6.4.1, 0.5.15 | Patch available | CNA |
| — | net-imap (RubyGems) | 0.6.0 to before 0.6.4.1 | 0.6.4.1 | Patch available | GHSA-46q3-7gv7-qmgg |
| — | net-imap (RubyGems) | before 0.5.15 | 0.5.15 | Patch available | GHSA-46q3-7gv7-qmgg |
- net-imap Vendorruby Affected 0.6.0 to before 0.6.4.1; before 0.5.15 Fixed in 0.6.4.1, 0.5.15 Patch available CNA
- net-imap (RubyGems) Vendor— Affected 0.6.0 to before 0.6.4.1 Fixed in 0.6.4.1 Patch available GHSA-46q3-7gv7-qmgg
- net-imap (RubyGems) Vendor— Affected before 0.5.15 Fixed in 0.5.15 Patch available GHSA-46q3-7gv7-qmgg
Remediation
- Fix · CNA net-imap (ruby) Fixed in 0.6.4.1, 0.5.15
- Fix · GHSA-46q3-7gv7-qmgg net-imap (RubyGems) Fixed in 0.6.4.1 Advisory →
- Fix · GHSA-46q3-7gv7-qmgg net-imap (RubyGems) Fixed in 0.5.15 Advisory →
Red Hat 12 advisories
- RHSA-2026:54416 Released 2026-08-12 · Red Hat rating Importantruby:3.3 security update
- Red Hat Enterprise Linux AppStream EUS (v.9.6) ruby-3.3.12-6.module+el9.6.0+24618+75aeb29f.1.aarch64::ruby:3.3, ruby-3.3.12-6.module+el9.6.0+24618+75aeb29f.1.i686::ruby:3.3, ruby-3.3.12-6.module+el9.6.0+24618+75aeb29f.1.ppc64le::ruby:3.3 +47
- RHSA-2026:54393 Released 2026-08-12 · Red Hat rating Importantruby:3.3 security update
- Red Hat Enterprise Linux AppStream E4S (v.9.4) ruby-3.3.12-7.module+el9.4.0+24628+a370c2b9.2.aarch64::ruby:3.3, ruby-3.3.12-7.module+el9.4.0+24628+a370c2b9.2.i686::ruby:3.3, ruby-3.3.12-7.module+el9.4.0+24628+a370c2b9.2.ppc64le::ruby:3.3 +47
- RHSA-2026:54391 Released 2026-08-12 · Red Hat rating Importantruby security update
- Red Hat Enterprise Linux AppStream EUS (v. 10.0) ruby-3.3.12-11.el10_0.3, ruby-bundled-gems-3.3.12-11.el10_0.3, ruby-default-gems-3.3.12-11.el10_0.3 +20
- Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) ruby-doc-3.3.12-11.el10_0.3
Show 9 more Red Hat advisories
- RHSA-2026:50827 Released 2026-08-05 · Red Hat rating Importantruby:4.0 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 9) ruby-4.0.6-34.module+el9.8.0+24564+e55418dc.aarch64::ruby:4.0, ruby-4.0.6-34.module+el9.8.0+24564+e55418dc.i686::ruby:4.0, ruby-4.0.6-34.module+el9.8.0+24564+e55418dc.ppc64le::ruby:4.0 +47
- RHSA-2026:50828 Released 2026-08-05 · Red Hat rating Importantruby:3.3 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 9) ruby-3.3.12-8.module+el9.8.0+24568+2bbebe96.aarch64::ruby:3.3, ruby-3.3.12-8.module+el9.8.0+24568+2bbebe96.i686::ruby:3.3, ruby-3.3.12-8.module+el9.8.0+24568+2bbebe96.ppc64le::ruby:3.3 +47
- RHSA-2026:50778 Released 2026-08-05 · Red Hat rating Importantruby security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 10) ruby-3.3.12-14.el10_2, ruby-bundled-gems-3.3.12-14.el10_2, ruby-default-gems-3.3.12-14.el10_2 +20
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) ruby-doc-3.3.12-14.el10_2
- RHSA-2026:50773 Released 2026-08-05 · Red Hat rating Importantruby4.0 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 10) ruby4.0-4.0.6-36.el10_2, ruby4.0-devel-4.0.6-36.el10_2, ruby4.0-rubygem-mysql2-0.5.7-36.el10_2 +1
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) ruby4.0-doc-4.0.6-36.el10_2
- RHSA-2026:50728 Released 2026-08-05 · Red Hat rating Importantruby:3.3 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-3.3.12-8.module+el8.10.0+24567+c4e5368e.aarch64::ruby:3.3, ruby-3.3.12-8.module+el8.10.0+24567+c4e5368e.i686::ruby:3.3, ruby-3.3.12-8.module+el8.10.0+24567+c4e5368e.ppc64le::ruby:3.3 +47
- RHSA-2026:40380 Released 2026-07-15 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images ruby3.3-3.3.10-23.4.hum1@aarch64, ruby3.3-3.3.10-23.4.hum1@src, ruby3.3-3.3.10-23.4.hum1@x86_64 +46
- RHSA-2026:38694 Released 2026-07-13 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images ruby3.4-3.4.10-31.hum1@aarch64, ruby3.4-3.4.10-31.hum1@src, ruby3.4-3.4.10-31.hum1@x86_64 +46
- RHSA-2026:34293 Released 2026-07-01 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images ruby3.4-3.4.8-31.3.hum1@aarch64, ruby3.4-3.4.8-31.3.hum1@src, ruby3.4-3.4.8-31.3.hum1@x86_64 +46
- RHSA-2026:33551 Released 2026-06-30 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images ruby4.0-4.0.0-33.4.hum1@aarch64, ruby4.0-4.0.0-33.4.hum1@src, ruby4.0-4.0.0-33.4.hum1@x86_64 +46
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2026:50773, RHSA-2026:50778 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2026:50728 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2026:50827, RHSA-2026:50828 |
| Red Hat Enterprise Linux AppStream E4S (v.9.4) | Fixed | RHSA-2026:54393 |
| Red Hat Enterprise Linux AppStream EUS (v. 10.0) | Fixed | RHSA-2026:54391 |
| Red Hat Enterprise Linux AppStream EUS (v.9.6) | Fixed | RHSA-2026:54416 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | RHSA-2026:50773, RHSA-2026:50778 |
| Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) | Fixed | RHSA-2026:54391 |
| Red Hat Hardened Images | Fixed | RHSA-2026:33551, RHSA-2026:34293, RHSA-2026:38694, RHSA-2026:40380 |
Not affected: 1 product
- Red Hat 3scale API Management Platform 2
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47242
- 2026-10-03 Alias added: GHSA-46q3-7gv7-qmgg
- 2026-10-18 Affected versions changed · Red Hat
References
Other 5
More ruby vulnerabilities
- TI-2026-71508 Integer overflow in GitLab allows code execution on the server KEVCVSS 3.1CRITICAL 10.0
- TI-2026-50176 Use after free in ruby json CVSS 4.0HIGH 8.7
- TI-2017-12709 Ruby before 2.4.3 allows Net::FTP command injection. CVSS 3.0HIGH 8.8
- TI-2008-03501 Algorithmic complexity vulnerability in the WEBrick::HTTPUtils.split_header_value… CVSS 2.0HIGH 7.8
- TI-2021-09891 In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web… CVSS 3.1HIGH 7.5
- TI-2025-18855 Net::IMAP vulnerable to possible DoS by memory exhaustion CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-47242 · CVE Program
- CVE-2026-47242 · NVD
- FIRST EPSS
- GHSA-46q3-7gv7-qmgg · GitHub Advisory Database · CC BY 4.0
- CVE-2026-47242 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences