CVE-2026-47242: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in ruby net-imap
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.
AI Analysis
Technical Summary
CVE-2026-47242 is a command injection vulnerability in Ruby's net-imap library affecting versions prior to 0.6.5 and 0.5.15. The vulnerability arises from improper input validation in the Net::IMAP#id and Net::IMAP#enable methods, which fail to neutralize special elements such as CRLF sequences and invalid atoms. This flaw enables attackers to inject arbitrary IMAP commands, potentially impacting the integrity of IMAP sessions. The vulnerability is rated medium severity with a CVSS 4.0 score of 5.8. The issue is resolved in net-imap versions 0.6.5 and 0.5.15.
Potential Impact
An attacker can exploit this vulnerability to inject arbitrary IMAP commands due to improper validation of input in the Net::IMAP#id and Net::IMAP#enable methods. This could lead to unauthorized command execution within the IMAP session context. The CVSS score of 5.8 reflects a medium severity impact with potential partial impact on confidentiality and integrity. There are no known exploits in the wild at this time.
Mitigation Recommendations
Fixed versions 0.6.5 and 0.5.15 of the Ruby net-imap library address this vulnerability. Users should upgrade to these versions or later to remediate the issue. No additional vendor advisory or temporary mitigations are provided. Patch status is confirmed by the presence of fixed versions.
CVE-2026-47242: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in ruby net-imap
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.
CVSS v4.0
Score 5.8medium
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-47242 is a command injection vulnerability in Ruby's net-imap library affecting versions prior to 0.6.5 and 0.5.15. The vulnerability arises from improper input validation in the Net::IMAP#id and Net::IMAP#enable methods, which fail to neutralize special elements such as CRLF sequences and invalid atoms. This flaw enables attackers to inject arbitrary IMAP commands, potentially impacting the integrity of IMAP sessions. The vulnerability is rated medium severity with a CVSS 4.0 score of 5.8. The issue is resolved in net-imap versions 0.6.5 and 0.5.15.
Potential Impact
An attacker can exploit this vulnerability to inject arbitrary IMAP commands due to improper validation of input in the Net::IMAP#id and Net::IMAP#enable methods. This could lead to unauthorized command execution within the IMAP session context. The CVSS score of 5.8 reflects a medium severity impact with potential partial impact on confidentiality and integrity. There are no known exploits in the wild at this time.
Mitigation Recommendations
Fixed versions 0.6.5 and 0.5.15 of the Ruby net-imap library address this vulnerability. Users should upgrade to these versions or later to remediate the issue. No additional vendor advisory or temporary mitigations are provided. Patch status is confirmed by the presence of fixed versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-18T22:54:18.272Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a39a0f5eed863c81e6b01e4
Added to database: 06/22/2026, 20:54:13 UTC
Last enriched: 07/07/2026, 12:33:08 UTC
Last updated: 08/04/2026, 13:32:58 UTC
Views: 66
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.