Impact
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. I'm not aware of attacks that do not require user interaction.
Patches
Fixed in Ghostty v1.0.1.
A new title_report
configuration was added that defaults to false to disable title reporting (CSI 21 t). The documentation notes the security risk of enabling this feature, but it remains available for compatibility reasons.
PR: #3908
Workarounds
You can workaround the issue in Ghostty v1.0.0 by explicitly setting a title in the configuration. For example:
When a title is set, set title CSIs are ignored and report title in v1.0.0 will report your fixed title.
References
Impact
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. I'm not aware of attacks that do not require user interaction.
Patches
Fixed in Ghostty v1.0.1.
A new
title_report
configuration was added that defaults to false to disable title reporting (CSI 21 t). The documentation notes the security risk of enabling this feature, but it remains available for compatibility reasons.PR: #3908
Workarounds
You can workaround the issue in Ghostty v1.0.0 by explicitly setting a title in the configuration. For example:
title = Ghostty
When a title is set, set title CSIs are ignored and report title in v1.0.0 will report your fixed title.
References