Skip to content

The file created by `write_*_file` actions have global read permissions

Low
mitchellh published GHSA-hfg5-8q2c-crhc Dec 31, 2024

Package

Ghostty (Ghostty)

Affected versions

1.0.0

Patched versions

1.0.1

Description

Impact

When a user runs a keybind action write_scrollback_file, write_screen_file, or write_selection_file, the created file had permissions 0644, allowing any user on the system to read the file. This can leak sensitive or secret information, depending on what was on the screen.

Further, the file is created in the temporary directory and not removed until an external process (not Ghostty) removes it, i.e. a system restart. Therefore, this sensitive or secret information can remain laying around for an indefinite period of time.

Patches

Fixed in Ghostty v1.0.1. The files are now created with mode 0600.

PR: #4201

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

CVE ID

No known CVE

Weaknesses

Credits