CVE-2026-47240: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in ruby net-imap
A command injection vulnerability exists in the Ruby net-imap library prior to versions 0.6.5 and 0.5.15. This vulnerability allows an attacker to inject arbitrary IMAP commands via specially crafted non-synchronizing literals if the IMAP server does not support this feature. The issue affects several Net::IMAP commands that accept raw data arguments, including search and fetch related methods. The vulnerability is fixed in versions 0.6.5 and 0.5.15.
AI Analysis
Technical Summary
The Ruby net-imap library implements IMAP client functionality. Before versions 0.6.5 and 0.5.15, certain Net::IMAP commands accept a raw data argument that is sent verbatim after validation intended to prevent command injection. However, if the IMAP server does not support non-synchronizing literals, it may interpret the sequence "+}\r\n" as the end of a malformed command line, responding with a tagged BAD. This causes the literal contents to be interpreted as new pipelined commands, enabling a CRLF injection attack. The affected commands include #search, #uid_search, #sort, #thread, #uid_sort, #uid_thread, #fetch, and #uid_fetch. The vulnerability is addressed in net-imap versions 0.6.5 and 0.5.15.
Potential Impact
An attacker can exploit this vulnerability to inject arbitrary IMAP commands when communicating with a server that does not support non-synchronizing literals. This could lead to unauthorized command execution within the IMAP session context. The CVSS 4.0 score is 5.8 (medium severity), reflecting local attack vector, low attack complexity, partial attack type, no privileges required, user interaction required, and high impact on integrity and low impact on availability and confidentiality.
Mitigation Recommendations
This vulnerability is fixed in net-imap versions 0.6.5 and 0.5.15. Users should upgrade to at least these versions to remediate the issue. No official vendor advisory is provided, and no temporary mitigations are described. Patch status is not explicitly confirmed beyond the stated fixed versions, so users should verify upgrade applicability. There is no indication of known exploits in the wild.
CVE-2026-47240: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in ruby net-imap
Description
A command injection vulnerability exists in the Ruby net-imap library prior to versions 0.6.5 and 0.5.15. This vulnerability allows an attacker to inject arbitrary IMAP commands via specially crafted non-synchronizing literals if the IMAP server does not support this feature. The issue affects several Net::IMAP commands that accept raw data arguments, including search and fetch related methods. The vulnerability is fixed in versions 0.6.5 and 0.5.15.
CVSS v4.0
Score 5.8medium
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Ruby net-imap library implements IMAP client functionality. Before versions 0.6.5 and 0.5.15, certain Net::IMAP commands accept a raw data argument that is sent verbatim after validation intended to prevent command injection. However, if the IMAP server does not support non-synchronizing literals, it may interpret the sequence "+}\r\n" as the end of a malformed command line, responding with a tagged BAD. This causes the literal contents to be interpreted as new pipelined commands, enabling a CRLF injection attack. The affected commands include #search, #uid_search, #sort, #thread, #uid_sort, #uid_thread, #fetch, and #uid_fetch. The vulnerability is addressed in net-imap versions 0.6.5 and 0.5.15.
Potential Impact
An attacker can exploit this vulnerability to inject arbitrary IMAP commands when communicating with a server that does not support non-synchronizing literals. This could lead to unauthorized command execution within the IMAP session context. The CVSS 4.0 score is 5.8 (medium severity), reflecting local attack vector, low attack complexity, partial attack type, no privileges required, user interaction required, and high impact on integrity and low impact on availability and confidentiality.
Mitigation Recommendations
This vulnerability is fixed in net-imap versions 0.6.5 and 0.5.15. Users should upgrade to at least these versions to remediate the issue. No official vendor advisory is provided, and no temporary mitigations are described. Patch status is not explicitly confirmed beyond the stated fixed versions, so users should verify upgrade applicability. There is no indication of known exploits in the wild.
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: 06/22/2026, 21:10:14 UTC
Last updated: 06/22/2026, 23:37:12 UTC
Views: 5
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.