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-38395

CVE-2024-38395: iTerm2 RCE Vulnerability

CVE-2024-38395 is a remote code execution flaw in iTerm2 where window title settings are not honored, potentially allowing unauthorized code execution. This post covers technical details, affected versions, and mitigation.

Published: April 15, 2026

CVE-2024-38395 Overview

CVE-2024-38395 is a code injection vulnerability affecting iTerm2, a popular terminal emulator for macOS. The vulnerability exists because the "Terminal may report window title" setting is not properly honored, which could allow remote code execution under certain conditions. While the vulnerability is classified as not trivially exploitable, the potential for remote code execution makes this a significant security concern for developers and system administrators who rely on iTerm2 for their daily workflows.

Critical Impact

Remote code execution vulnerability in iTerm2 before version 3.5.2 due to improper enforcement of security settings related to terminal window title reporting.

Affected Products

  • iTerm2 versions prior to 3.5.2
  • macOS systems running vulnerable iTerm2 installations

Discovery Timeline

  • June 16, 2024 - CVE-2024-38395 published to NVD
  • June 18, 2025 - Last updated in NVD database

Technical Details for CVE-2024-38395

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code), commonly known as code injection. The flaw resides in iTerm2's handling of terminal escape sequences related to window title reporting. Terminal emulators can respond to certain escape sequences by sending data back to the terminal, which can then be interpreted as commands.

In iTerm2, users have a setting called "Terminal may report window title" that is designed to prevent the terminal from responding to title query escape sequences. However, this security setting was not being properly enforced, meaning malicious content could potentially trigger code execution even when users believed they had disabled this functionality.

The attack scenario involves an attacker crafting malicious content that, when displayed in the terminal, would cause iTerm2 to process escape sequences in an unintended manner. This could occur through various vectors such as viewing malicious files, connecting to compromised servers, or processing untrusted data through the terminal.

Root Cause

The root cause of this vulnerability lies in the improper enforcement of the "Terminal may report window title" configuration setting. The code path responsible for handling terminal escape sequences failed to properly check the user's security preferences before processing window title reporting requests. This allowed escape sequences to be processed regardless of the user's intended security configuration.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction in the worst-case scenario. An attacker could exploit this vulnerability through several methods:

  • Embedding malicious escape sequences in files that may be viewed in the terminal (such as through cat, less, or similar commands)
  • Compromising a remote server that a user connects to via SSH, allowing the server to send malicious escape sequences
  • Crafting malicious content that gets displayed in terminal applications processing untrusted input

The vulnerability mechanism involves terminal escape sequences that query the window title. When the terminal responds to these queries, the response data can be crafted to include executable commands that get interpreted by the shell. For detailed technical analysis, refer to the Openwall OSS Security disclosure.

Detection Methods for CVE-2024-38395

Indicators of Compromise

  • Unusual terminal escape sequences appearing in log files or command history
  • Unexpected command execution following SSH sessions or file viewing operations
  • iTerm2 window titles changing unexpectedly or containing suspicious content
  • Network connections initiated from the terminal process without user action

Detection Strategies

  • Monitor iTerm2 process behavior for spawning unexpected child processes
  • Implement endpoint detection rules that flag suspicious escape sequence patterns in terminal data streams
  • Review iTerm2 version across managed macOS endpoints to identify unpatched installations
  • Audit command history for anomalous commands that may indicate exploitation attempts

Monitoring Recommendations

  • Deploy endpoint detection and response (EDR) solutions capable of monitoring terminal emulator behavior
  • Implement application version monitoring to ensure iTerm2 installations are current
  • Configure SIEM rules to correlate terminal-related anomalies across the enterprise
  • Enable enhanced logging for shell sessions to capture potential exploitation artifacts

How to Mitigate CVE-2024-38395

Immediate Actions Required

  • Upgrade iTerm2 to version 3.5.2 or later immediately
  • Audit all macOS endpoints for vulnerable iTerm2 installations
  • Review any suspicious activity on systems where iTerm2 may have processed untrusted content
  • Consider temporarily switching to an alternative terminal emulator if immediate patching is not possible

Patch Information

The vulnerability has been addressed in iTerm2 version 3.5.2. The fix is available through the official iTerm2 downloads page. The specific commit addressing this vulnerability can be reviewed in the GitLab iTerm2 commit log. The release tag is available at the GitLab iTerm2 release page.

Workarounds

  • Disable the "Terminal may report window title" setting in iTerm2 Preferences (though this setting was not being honored, it should be disabled as a defense-in-depth measure)
  • Avoid viewing untrusted files in the terminal using commands like cat or less until patched
  • Exercise caution when connecting to untrusted remote servers via SSH
  • Consider using sandboxing or containerization when working with untrusted content
bash
# Verify iTerm2 version from command line
# Navigate to iTerm2 > About iTerm2, or check:
defaults read /Applications/iTerm.app/Contents/Info CFBundleShortVersionString

# Ensure version is 3.5.2 or later
# If outdated, update via Homebrew:
brew update && brew upgrade --cask iterm2

# Or download directly from iterm2.com/downloads.html

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 Probability9.24%

  • 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 Update

  • GitLab iTerm2 Release Tag

  • iTerm2 Download Page

  • Openwall OSS Security Update
  • Vendor Resources
  • GitLab iTerm2 Commit Log
  • Related CVEs
  • CVE-2024-38396: 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