Description

A security vulnerability in iTerm2, a widely used terminal emulator for macOS, could allow attackers to execute arbitrary shell commands when a user displays a specially crafted text file. The issue affects iTerm2 versions 3.6.1 through 3.7.8, including installations using default settings. Unlike conventional attacks, the victim does not need to execute the file or manually paste a command; simply displaying its contents in a vulnerable terminal can trigger command execution. The developer addressed the issue in iTerm2 version 3.7.9, released with a security fix on November 20, 2026. The vulnerability originates in iTerm2's implementation of the Kitty graphics protocol, which supports displaying images within terminal sessions. Improper handling of error responses allows attacker-controlled text and line breaks to pass through the terminal's pseudoterminal channel. Because this channel also carries shell input, embedded line breaks can be interpreted as command submissions. The flaw is a command-injection logic issue rather than a memory corruption vulnerability. It could expose users to malicious files obtained from untrusted repositories, archives, or attachments. Organizations should update macOS developer workstations to iTerm2 3.7.9 or later. Until patched, users should avoid displaying unfamiliar files directly in iTerm2 and inspect suspicious content using a separate text editor. IT teams should verify installed versions, monitor unexpected shell activity, and review terminal-related processes for suspicious command execution.