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…

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

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

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: 06/22/2026, 21:10:14 UTC

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.

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: 06/22/2026, 21:10:14 UTC

Last updated: 06/22/2026, 23:37:12 UTC

Views: 5

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