The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-42258

CVE-2026-42258: Ruby Net::IMAP Command Injection Flaw

CVE-2026-42258 is a CRLF injection flaw in Ruby's Net::IMAP library that enables IMAP command injection through symbol arguments. This article covers the technical details, affected versions, and mitigation steps.

Published: May 18, 2026

CVE-2026-42258 Overview

CVE-2026-42258 is a Carriage Return Line Feed (CRLF) injection vulnerability in Net::IMAP, the Ruby standard library that implements Internet Message Access Protocol (IMAP) client functionality. The flaw allows attackers to inject arbitrary IMAP commands when applications pass Symbol arguments to IMAP commands without sanitization. Maintainers have patched the issue in versions 0.4.24, 0.5.14, and 0.6.4. The vulnerability is tracked under [CWE-77] (Improper Neutralization of Special Elements used in a Command).

Critical Impact

An attacker who controls Symbol values passed to Net::IMAP commands can inject CRLF sequences to smuggle additional IMAP protocol commands, potentially manipulating mailbox state or exfiltrating mail data.

Affected Products

  • Ruby net-imap gem versions prior to 0.4.24
  • Ruby net-imap gem versions 0.5.x prior to 0.5.14
  • Ruby net-imap gem versions 0.6.x prior to 0.6.4

Discovery Timeline

  • 2026-05-09 - CVE-2026-42258 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-42258

Vulnerability Analysis

The Net::IMAP library constructs IMAP protocol messages by serializing Ruby arguments into wire-format strings. String arguments are properly validated and quoted to neutralize CRLF sequences, which serve as command terminators in the IMAP protocol. Symbol arguments, however, bypass these checks. The library converts symbols to strings without applying the same sanitization, allowing embedded \r\n sequences to pass through unmodified. An attacker who controls a symbol value reaching commands such as select, examine, status, or fetch can append arbitrary IMAP commands to the request stream.

Root Cause

The root cause is inconsistent input validation across argument types. The protocol serialization code treats Symbol as a trusted type and skips the CRLF neutralization applied to String inputs. This breaks the implicit contract that all user-influenced data is sanitized before being written to the network socket. The defect maps to [CWE-77] because raw protocol delimiters are passed into a command stream without escaping.

Attack Vector

Exploitation requires a Ruby application that converts external input into a Symbol and forwards it to a Net::IMAP command. The attacker supplies a value containing \r\n followed by an injected IMAP command tag and verb. When the IMAP client serializes the request, the server interprets the injected sequence as a second command. Successful exploitation can modify mailbox selection, delete messages, or trigger unintended FETCH operations against arbitrary mailboxes the authenticated session can access. The attack vector is local in CVSS terms because it requires the attacker to influence values supplied to the in-process IMAP client.

No verified public exploit code is available. See the GitHub Security Advisory GHSA-75xq-5h9v-w6px for full technical details.

Detection Methods for CVE-2026-42258

Indicators of Compromise

  • Unexpected IMAP commands appearing in mail server logs from sessions originating at Ruby application hosts.
  • Multiple IMAP command tags transmitted within a single client request frame.
  • Mailbox state changes (SELECT, DELETE, STORE) that do not correspond to documented application workflows.

Detection Strategies

  • Inventory Ruby applications and check Gemfile.lock for net-imap versions below 0.4.24, 0.5.14, or 0.6.4.
  • Perform static code review for call sites that pass Symbol values derived from user input into Net::IMAP methods such as select, examine, status, list, and fetch.
  • Inspect IMAP server logs for command tags containing embedded CRLF artifacts or anomalous command sequencing on a single TCP connection.

Monitoring Recommendations

  • Forward IMAP server access and command logs to a centralized analytics platform and alert on unexpected DELETE, EXPUNGE, or cross-mailbox FETCH activity.
  • Monitor outbound IMAP traffic from application servers for protocol anomalies using network detection rules.
  • Track dependency manifests in CI pipelines and alert on builds that pin vulnerable net-imap versions.

How to Mitigate CVE-2026-42258

Immediate Actions Required

  • Upgrade net-imap to 0.4.24, 0.5.14, or 0.6.4 depending on the branch currently deployed.
  • Audit application code for IMAP command invocations that accept external input and ensure values are passed as validated String objects.
  • Rebuild and redeploy any container images, gems, or bundled artifacts that include the vulnerable library.

Patch Information

The Ruby net-imap maintainers released fixes in v0.4.24, v0.5.14, and v0.6.4. The patches extend CRLF neutralization to Symbol arguments so they are validated using the same logic as String inputs. Application owners should update Gemfile constraints and run bundle update net-imap.

Workarounds

  • Convert all Symbol arguments to String and reject values containing \r or \n before invoking any Net::IMAP command.
  • Restrict IMAP service accounts used by Ruby applications to least-privilege mailboxes to limit the blast radius of injected commands.
  • Where upgrades are blocked, wrap Net::IMAP calls in an internal helper that enforces an allowlist of permitted mailbox identifiers.
bash
# Update the vulnerable gem to a patched release
bundle update net-imap

# Verify the installed version is patched
bundle exec gem list net-imap

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeOther

  • Vendor/TechRuby

  • SeverityMEDIUM

  • CVSS Score5.8

  • EPSS Probability0.16%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityHigh
  • AvailabilityLow
  • CWE References
  • CWE-77
  • Technical References
  • GitHub Release v0.4.24

  • GitHub Release v0.5.14

  • GitHub Release v0.6.4

  • GitHub Security Advisory GHSA-75xq-5h9v-w6px
  • Related CVEs
  • CVE-2026-42246: Ruby Net::IMAP TLS Bypass Vulnerability

  • CVE-2020-25613: Ruby WEBrick HTTP Request Smuggling Flaw

  • CVE-2020-10663: Ruby JSON Gem Object Creation Vulnerability

  • CVE-2026-42245: Ruby Net::IMAP DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English