Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 60%

CVE-2026-47240: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in ruby net-imap

0
Medium
VulnerabilityCVE-2026-47240cvecve-2026-47240cwe-77cwe-93
Published: 06/22/2026 (06/22/2026, 20:17:15 UTC)
Source: CVE Database V5
Vendor/Project: ruby
Product: 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

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Affected software

Affected versions
>=0.0.0 <0.6.5>=0.0.0 <0.5.15

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/07/2026, 12:33:16 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses