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-2024-38396

CVE-2024-38396: iTerm2 RCE Vulnerability

CVE-2024-38396 is a remote code execution flaw in iTerm2 3.5.x before 3.5.2 that exploits window title escape sequences with tmux integration. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2024-38396 Overview

CVE-2024-38396 is a code injection vulnerability in iTerm2 versions 3.5.x prior to 3.5.2. The vulnerability stems from unfiltered use of an escape sequence used to report window titles, which when combined with iTerm2's built-in tmux integration feature (enabled by default), allows an attacker to inject arbitrary code into the terminal. This vulnerability is distinct from CVE-2024-38395, which addresses a related but separate escape sequence issue.

Critical Impact

This vulnerability allows remote code execution through specially crafted terminal escape sequences, potentially enabling complete system compromise when a user views malicious content in iTerm2 with tmux integration enabled.

Affected Products

  • iTerm2 3.5.x versions prior to 3.5.2
  • macOS systems running vulnerable iTerm2 versions with tmux integration enabled (default configuration)

Discovery Timeline

  • June 16, 2024 - CVE-2024-38396 published to NVD
  • June 20, 2025 - Last updated in NVD database

Technical Details for CVE-2024-38396

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code - Code Injection). The flaw exists in how iTerm2 processes terminal escape sequences, specifically those related to window title reporting. Terminal emulators use escape sequences to perform various functions including setting window titles, changing colors, and interacting with the shell environment.

The attack requires no user interaction beyond viewing content containing the malicious escape sequence, and can be triggered over the network through various vectors such as SSH sessions, curl/wget commands, or simply displaying malicious file contents. The tmux integration feature, which is enabled by default in iTerm2, creates the conditions necessary for the escape sequence to be interpreted in a way that enables code injection.

Root Cause

The root cause lies in insufficient sanitization of escape sequences used to report window titles. When iTerm2's tmux integration processes these escape sequences, it fails to properly filter potentially dangerous characters or sequences, allowing an attacker to break out of the intended context and inject arbitrary commands that are then executed by the terminal.

Attack Vector

The attack can be delivered through network-based vectors without requiring authentication or user interaction. An attacker can embed malicious escape sequences in:

  • Files that might be displayed using cat, less, or other utilities
  • SSH banners or MOTD files on compromised servers
  • Web content retrieved via command-line tools like curl or wget
  • Log files or any other content that may be viewed in the terminal

When the victim's iTerm2 terminal processes the malicious escape sequence with tmux integration active, the injected code is executed with the privileges of the user running the terminal session. The vulnerability mechanism involves the terminal's window title reporting functionality being abused to inject commands that escape the normal escape sequence processing boundaries.

Detection Methods for CVE-2024-38396

Indicators of Compromise

  • Unexpected terminal commands appearing in shell history that the user did not type
  • Unusual escape sequences in terminal output, particularly those involving window title manipulation (OSC sequences starting with \\x1b])
  • Unexplained process execution or network connections initiated from terminal sessions
  • Suspicious activity originating from tmux sessions or iTerm2 processes

Detection Strategies

  • Monitor for unusual escape sequence patterns in network traffic destined for terminal sessions
  • Implement logging of terminal input/output to detect injection patterns
  • Review shell history files for commands that users report not executing
  • Deploy endpoint detection rules for suspicious child processes spawned by iTerm2

Monitoring Recommendations

  • Enable enhanced logging for iTerm2 sessions in enterprise environments
  • Monitor file integrity of commonly viewed files that could be vectors for attack
  • Implement network monitoring for known malicious escape sequence patterns
  • Consider deploying SentinelOne Singularity XDR for real-time behavioral analysis of terminal emulator processes

How to Mitigate CVE-2024-38396

Immediate Actions Required

  • Update iTerm2 to version 3.5.2 or later immediately from the iTerm2 Official Downloads page
  • If immediate patching is not possible, disable tmux integration in iTerm2 preferences
  • Avoid viewing untrusted content in terminal sessions until patched
  • Review recent terminal activity for signs of compromise

Patch Information

The vendor has addressed this vulnerability in iTerm2 version 3.5.2. The fix involves properly filtering escape sequences to prevent code injection through the window title reporting mechanism. The specific commit addressing this issue is available in the GitLab iTerm2 Commit Update.

Organizations should prioritize this update given the network-based attack vector and default vulnerable configuration. The patch ensures that escape sequences used for window title reporting are properly sanitized before being processed by the tmux integration feature.

Workarounds

  • Disable tmux integration in iTerm2 by navigating to Preferences → General → tmux and unchecking "Enable tmux integration"
  • Use alternative terminal emulators until iTerm2 can be updated
  • Implement network filtering to block known malicious escape sequence patterns at the perimeter
  • Avoid SSH connections to untrusted or potentially compromised systems until patched
bash
# Verify iTerm2 version (run from Applications folder)
/Applications/iTerm.app/Contents/MacOS/iTerm2 --version

# Check if tmux integration is enabled (look for tmux-related settings)
defaults read com.googlecode.iterm2 | grep -i tmux

# To manually disable tmux integration via command line
defaults write com.googlecode.iterm2 NoSyncTmuxSupport -bool false

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechIterm2

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability10.30%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • Openwall OSS-Security Discussion

  • iTerm2 Official Downloads

  • GitHub Blog on iTerm2 RCE
  • Vendor Resources
  • GitLab iTerm2 Commit Update
  • Related CVEs
  • CVE-2024-38395: iTerm2 RCE Vulnerability

  • CVE-2025-22275: iTerm2 Information Disclosure Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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