CVE-2026-47242 Details
Description
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.
A command injection vulnerability exists in the Ruby Net::IMAP library, specifically in versions 0.6.0 through 0.6.4 and 0.0 through 0.5.14. The vulnerability arises because the Net::IMAP#id and #enable methods do not properly validate their input arguments. This lack of validation allows an attacker to inject arbitrary IMAP commands. While the #id method can correctly quote ID field values, it fails to validate against CRLF sequences. The #enable method processes arguments for aliases but does not ensure they are valid atoms or lists of valid atoms, sending the #to_s value directly without validation. As a result, untrusted inputs can be exploited to inject commands such as deleting mailboxes, potentially leading to unauthorized manipulation of email data.
Users can update to Net::IMAP versions 0.6.4.1 or 0.5.15, both of which address the vulnerability by implementing proper input validation. If an upgrade is not possible, untrusted inputs should be avoided for #enable arguments, and client ID field values should be validated to ensure they do not contain carriage return or line feed bytes.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 22, 2026CISA-ADP
Assessed Jun 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ruby/net-imap/security/advisories/GHSA-46q3-7gv7-qmgg | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | [email protected] |
| CWE-93 | Improper Neutralization of CRLF Sequences ('CRLF Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Ruby Net::IMAP | >= 0.6.0, <= 0.6.4 (semver) >= 0, <= 0.5.14 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jun 23, 2026 | CVE Modified | CISA-ADP |
| Jun 22, 2026 | New CVE Received | [email protected] |
Volerion