CVE-2024-56803 Ghostty improperly handles window title sequences which can lead to arbitrary command execution

Medium 5.1 Published Updated

Attackers can execute arbitrary commands in Ghostty by injecting malicious escape sequences into window titles, requiring user interaction to press Enter.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2024-56803?

CVE-2024-56803 is a medium-severity code injection vulnerability in ghostty-org ghostty, published on 31 Dec 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Ghostty is a cross-platform terminal emulator. Ghostty, as allowed by default in 1.0.0, allows attackers to modify the window title via a certain character escape sequence and then insert it back to the command line in the user's terminal, e.g. when the user views a file containing the malicious sequence, which could allow the attacker to execute arbitrary commands. This attack requires an attacker to send malicious escape sequences followed by convincing the user to physically press the "enter" key. Fixed in Ghostty v1.0.1.

Weakness: CWE-94

Which versions are affected by CVE-2024-56803?

How do I fix CVE-2024-56803?

No fix has been published for CVE-2024-56803 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-56803 being exploited?

There is no known exploitation of CVE-2024-56803 in the wild and no public exploit code.

Sources

Also known as GHSA-5hcq-3j4q-4v6p, UBUNTU-CVE-2024-56803.

Is CVE-2024-56803 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free