Skip to main content
Mallory
← Back to News
endpoint-software-vulnerability

iTerm2 Flaw Allows Shell Command Execution When Displaying Crafted Files

Vulnerability Disclosure · 3 sources · Updated 3d ago · First seen Nov 21, 2026

iTerm2 Flaw Allows Shell Command Execution When Displaying Crafted Files

A command-execution vulnerability in iTerm2 allows malicious files to trigger arbitrary shell commands simply when their contents are displayed in a vulnerable terminal session, without executing a script or pasting a command. The flaw affects installations with Kitty image protocol support, with reported affected versions spanning 3.6.1 through 3.7.8, including default configurations. Researcher ii4gsp reported that the exploit works across bash, zsh, and fish without memory corruption or a race condition.

The exploit chains a missing trust check in Application Program Command (APC) handling with unsafe Kitty file-transfer error responses. A crafted file path causes literal newlines to survive in an error reply written to pseudoterminal input, where the shell interprets them as command separators. iTerm2 3.7.9 fixes the issue by filtering control characters from replies. The vendor’s release notes do not report exploitation in the wild. Organizations should update to 3.7.9 or later and avoid displaying unfamiliar files as raw terminal output until patched.

Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

3 events · Nov 20, 2026
  1. Reported Nov 23, 20263d ago

    Follow-up hardening extends filtering to other terminal replies

    Developers extended control-character filtering to Kitty drag-and-drop replies and terminal title reports. They also added tests to verify that unsafe characters are removed without breaking valid replies.

    iTerm2 Remote Code Execution Flaw Lets Hackers Run Malicious Commands by Displaying Crafted Files
  2. Reported Nov 21, 20265d ago

    Technical disclosure details iTerm2 command execution through crafted file output

    A technical write-up described how displaying a crafted file can trigger Kitty protocol error replies containing literal newlines, which the shell interprets as command separators. The exploit chain combines a missing APC trust check, unsafe error text, and replies written to terminal input, affecting default configurations without requiring script execution.

    iTerm2 RCE via Kitty Image Protocol APC Response Injection · ii4gsp
  3. Nov 20, 20267d ago

    iTerm2 3.7.9 security update built with command-injection fix

    iTerm2 version 3.7.9, built on November 20, 2026, fixes a command-execution vulnerability by replacing control characters in Kitty graphics replies with spaces before sending them to the pseudoterminal. The vendor credits Minseong Kim of NSHC Red Alert Labs with reporting the flaw.

    iTerm2 RCE via Kitty Image Protocol APC Response Injection · ii4gsp
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.