CVE-2026-47240: 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, 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.
AI Analysis
Technical Summary
This vulnerability in Ruby's net-imap library (CVE-2026-47240) involves improper neutralization of special elements used in commands (CWE-77). It arises when raw data arguments to certain Net::IMAP commands can be manipulated due to lack of server support for non-synchronizing literals, enabling injection of arbitrary IMAP commands. The issue affects versions prior to 0.6.5 and 0.5.15 and impacts search and fetch related commands. The CVSS 4.0 vector indicates local attack vector with low attack complexity, partial user interaction, and high impact on integrity. The vulnerability is fixed in versions 0.6.5 and 0.5.15.
Potential Impact
An attacker with local access and partial user interaction can exploit this vulnerability to inject arbitrary IMAP commands, potentially compromising the integrity of IMAP operations such as search and fetch. This could lead to unauthorized command execution within the context of the net-imap library usage.
Mitigation Recommendations
This vulnerability is fixed in Ruby net-imap versions 0.6.5 and 0.5.15. Users should upgrade to these versions or later to remediate the issue. No vendor advisory contradicts this; therefore, upgrading is the recommended action.
CVE-2026-47240: 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, 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.
CVSS v4.0
Score 5.8medium
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in Ruby's net-imap library (CVE-2026-47240) involves improper neutralization of special elements used in commands (CWE-77). It arises when raw data arguments to certain Net::IMAP commands can be manipulated due to lack of server support for non-synchronizing literals, enabling injection of arbitrary IMAP commands. The issue affects versions prior to 0.6.5 and 0.5.15 and impacts search and fetch related commands. The CVSS 4.0 vector indicates local attack vector with low attack complexity, partial user interaction, and high impact on integrity. The vulnerability is fixed in versions 0.6.5 and 0.5.15.
Potential Impact
An attacker with local access and partial user interaction can exploit this vulnerability to inject arbitrary IMAP commands, potentially compromising the integrity of IMAP operations such as search and fetch. This could lead to unauthorized command execution within the context of the net-imap library usage.
Mitigation Recommendations
This vulnerability is fixed in Ruby net-imap versions 0.6.5 and 0.5.15. Users should upgrade to these versions or later to remediate the issue. No vendor advisory contradicts this; therefore, upgrading is the recommended action.
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: 6a39a0f5eed863c81e6b01de
Added to database: 06/22/2026, 20:54:13 UTC
Last enriched: 07/07/2026, 12:33:16 UTC
Last updated: 08/06/2026, 00:41:13 UTC
Views: 60
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.