CVE-2026-6842
nano: nano: Local attacker can inject malicious .desktop launcher due to insecure directory permissions
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 13, 2026
Updated · September 1, 2026
Description
A flaw was found in nano. In environments with permissive umask settings, a local attacker can exploit incorrect directory permissions (0777 instead of 0700) for the ~/.local directory. This allows the attacker to inject a malicious .desktop launcher, which could lead to unintended actions or information disclosure if the launcher is subsequently processed.
Statement
This is a Low impact flaw where nano creates the ~/.local directory with insecure permissions (0777) in permissive umask environments. A local attacker can exploit this to inject a malicious .desktop launcher. This issue affects Red Hat Enterprise Linux 8 and 9.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Ensure that the system's umask is configured to a secure value, such as 0022 or 0077, to prevent the creation of world-writable directories. This can be set system-wide in /etc/profile or /etc/bashrc, or for individual users in their ~/.bashrc or ~/.profile. A secure umask will ensure that newly created directories, including ~/.local by nano, have appropriate permissions.
CVSS / CWE
CVSS 3.1 · 2.5CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
CWE-732 · Incorrect Permission Assignment for Critical Resource