SecOraLens
HighCVE

iTerm2 Remote Code Execution Flaw Lets Hackers Run Malicious Commands by Displaying Crafted Files

Cyber Security News·Source published ·1 min read

What happened?

A security flaw in iTerm2, a macOS terminal emulator, lets attackers run commands when a user displays a specially crafted file in a vulnerable terminal session. The user does not have to run the file as a script or paste a command supplied by the attacker. Printing the file’s contents is enough to trigger the bug. The developer fixed the issue in iTerm2 3.7.9, a security update built on November 20, 2026. The reported affected range is 3.6.1 through 3.7.8, and the flaw can affect installations using default settings.

Key details

  • A flaw in iTerm2 lets attackers run commands when a user displays a crafted file in a terminal session.
  • The bug is in iTerm2's Kitty graphics protocol implementation where error replies preserve untrusted text and line breaks.
  • iTerm2 sends the error reply to the pseudoterminal where the shell can treat line breaks as Return key presses and execute the text.
  • The vulnerability affects iTerm2 versions 3.6.1 through 3.7.8 and can impact installations using default settings.
  • The developer fixed the issue in iTerm2 3.7.9 released on November 20, 2026.
  • The fix replaces line breaks and control characters with spaces in Kitty graphics replies before sending them to the pseudoterminal.
  • A follow-up change applies the same filtering to Kitty drag-and-drop replies and terminal title reports with added tests.

What is affected?

  • iTerm2 versions 3.6.1 through 3.7.8

How do I fix or mitigate it?

  1. Update to iTerm2 3.7.9 or later via the official downloads page.
  2. The fix filters line breaks and control characters in Kitty graphics replies, drag-and-drop replies, and terminal title reports.
  3. Until updated, avoid printing raw contents from unfamiliar sources into iTerm2; use a graphical text editor instead.

Summarised by SecOraLens from Cyber Security News. Always read the original source before acting. How SecOraLens verifies advisories.

What to do next

For CISOs and SOC leads

Brief your board. Brief your team.

Executive risk briefs for governance, technical kill-chains for the SOC — delivered as advisories publish. Critical alerts within 1 hour. No spam, unsubscribe anytime.