CVE-2026-136950 in Ghostty
Summary
by MITRE • 11/26/2026
A security vulnerability has been detected in Ghostty up to 1.3.1. The impacted element is an unknown function of the component macOS OSC 8 Hyperlink Handler. Such manipulation leads to injection. The attack can be launched remotely. Upgrading to version 1.4.0 is sufficient to resolve this issue. The name of the patch is 54fe8e188552977249a084db687e75aee6bf12e9. Upgrading the affected component is advised.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/28/2026
A security vulnerability has been identified within Ghostty, specifically affecting versions up to 1.3.1, involving its macOS OSC 8 Hyperlink Handler component. This flaw stems from an insufficient validation mechanism in the function responsible for processing terminal escape sequences that define hyperlinks. The operational context of this vulnerability relies on the interaction between a remote attacker and the victim's terminal emulator through standard input streams or network-connected services that render text output to Ghostty. By crafting malicious OSC 8 sequences, an adversary can inject arbitrary data into the hyperlink metadata fields, which are typically used to store URLs associated with highlighted text regions in the terminal interface.
The technical nature of this flaw constitutes a form of injection vulnerability, closely aligned with CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component and potentially CWE-20 Poor Input Validation. The OSC 8 standard allows terminals to associate displayed text with external links for user interaction via mouse clicks or keyboard shortcuts. When the handler fails to properly sanitize input, it permits the inclusion of malformed characters or unexpected protocol schemes that can alter how the terminal processes subsequent commands or interacts with host system applications. This lack of strict boundary checking enables an attacker to manipulate the internal state of the hyperlink rendering engine, potentially leading to unintended execution paths or data leakage depending on how the underlying operating system handles the generated link events.
From a threat actor perspective, this vulnerability supports remote exploitation scenarios classified under MITRE ATT&CK technique T1059 Command and Scripting Interpreter through terminal emulation abuse. An attacker could leverage this flaw in environments where users are compelled to view untrusted output from automated scripts, CI/CD pipelines, or shared development servers. The impact ranges from minor UI anomalies to more severe consequences such as phishing attacks if the injected link directs the user to a malicious website that mimics legitimate services. In worst-case scenarios involving complex terminal multiplexers or integrated IDEs, improper handling of these sequences could facilitate further lateral movement by exploiting trust relationships between the terminal session and host applications.
Mitigation strategies primarily focus on immediate software updates rather than configuration changes due to the fundamental nature of the code defect. Upgrading Ghostty to version 1.4.0 is sufficient to resolve this issue, as indicated by the patch identifier 54fe8e188552977249a084db687e75aee6bf12e9. This update introduces rigorous input validation and sanitization routines within the OSC 8 handler to ensure that only well-formed, safe hyperlink data is processed. Organizations relying on Ghostty for development or operational workflows should prioritize this upgrade across all affected endpoints. Additionally, implementing network-level filtering to restrict terminal output from untrusted sources can provide a layer of defense in depth while patching efforts are completed.