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-47242: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in ruby net-imap

0
Medium
VulnerabilityCVE-2026-47242cvecve-2026-47242cwe-77cwe-93
Published: 06/22/2026 (06/22/2026, 20:19:41 UTC)
Source: CVE Database V5
Vendor/Project: ruby
Product: net-imap

Description

A command injection vulnerability exists in Ruby's net-imap library prior to versions 0.6.5 and 0.5.15. The vulnerability arises because the Net::IMAP#id method does not validate CRLF sequences in hash argument values, and the Net::IMAP#enable method does not validate its arguments as valid atoms, allowing attacker-controlled input to be sent verbatim. This can enable injection of arbitrary IMAP commands. The issue 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.6.5<0.5.15

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/22/2026, 21:09:55 UTC

Technical Analysis

The net-imap Ruby library implements IMAP client functionality. Before versions 0.6.5 and 0.5.15, the Net::IMAP#id method, when called with a hash argument, properly quoted ID field strings but did not prohibit CRLF sequences, allowing injection vectors. Similarly, Net::IMAP#enable processes arguments for aliases but does not validate them as valid atoms, sending the #to_s value verbatim. These flaws allow an attacker to inject arbitrary IMAP commands via crafted arguments. The vulnerability is addressed by fixes in versions 0.6.5 and 0.5.15.

Potential Impact

An attacker able to supply crafted arguments to Net::IMAP#id or Net::IMAP#enable could inject arbitrary IMAP commands, potentially leading to unauthorized actions or manipulation of the IMAP session. The CVSS 5.8 (medium) reflects local attack vector with low complexity and partial user interaction required. No known exploits in the wild have been reported.

Mitigation Recommendations

Upgrade to net-imap version 0.6.5 or 0.5.15 or later, where the vulnerability is fixed. No other mitigation or temporary workaround is indicated. Patch status is not explicitly confirmed in the advisory, but the description states the issue is fixed in these versions.

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: 6a39a0f5eed863c81e6b01e4

Added to database: 06/22/2026, 20:54:13 UTC

Last enriched: 06/22/2026, 21:09:55 UTC

Last updated: 06/23/2026, 03:57:28 UTC

Views: 7

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