CVE-2026-40556
published 2026-04-28CVE-2026-40556: GNU nano creates the user’s ~/.local directory with overly permissive permissions when the directory does not exist yet. On first use of features requiring…
PriorityP414low2.1CVSS 4.0
AVLACLATPPRNUINVCNVILVANSCNSINSANEXCRXIRXARXMAVXMACXMATXMPRXMUIXMVCXMVIXMVAXMSCXMSIXMSAXSXAUXRXVXREXUX
GNU nano creates the user’s ~/.local directory with overly permissive permissions when the directory does not exist yet. On first use of features requiring Cross-Desktop Group (XDG) data storage, nano explicitly requests directory mode 0777, making the directory world‑writable in environments where the process umask does not sufficiently restrict permissions.
In systems with a relaxed or zero umask, such as container environments, CI/CD runners, embedded systems, or user shells configured with umask 000, this results in ~/.local being created as world‑writable. A local attacker can exploit a race window between nano’s creation of ~/.local and its subsequent creation of more restrictive subdirectories to write attacker‑controlled files into the victim’s XDG directory hierarchy.
This problem was fixed in nano version 9.0
Affected
1 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| gnu | nano | >= 2.9.1 < 9.0 | 9.0 |
CVSS provenance
nvdv4.02.1LOWCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
cvelistv5v4.02.1LOWCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
VulDB
GNU nano up to 8.x Local Directory Page ~/.local permission assignment (EUVD-2026-26053)
vuldb·2026-04-28·CVSS 2.1
CVE-2026-40556 [LOW] GNU nano up to 8.x Local Directory Page ~/.local permission assignment (EUVD-2026-26053)
A vulnerability labeled as problematic has been found in GNU nano up to 8.x. This vulnerability affects unknown code of the file ~/.local of the component Local Directory Page. Such manipulation leads to incorrect permission assignment.
This vulnerability is listed as CVE-2026-40556. The attack must be carried out locally. There is no available exploit.
The affected component should be upgraded.
GHSA
GHSA-9g7j-rcqf-cpcx: GNU nano creates the user’s ~/
ghsa_unreviewed·2026-04-28
CVE-2026-40556 [LOW] CWE-732 GHSA-9g7j-rcqf-cpcx: GNU nano creates the user’s ~/
GNU nano creates the user’s ~/.local directory with overly permissive permissions when the directory does not exist yet. On first use of features requiring Cross-Desktop Group (XDG) data storage, nano explicitly requests directory mode 0777, making the directory world‑writable in environments where the process umask does not sufficiently restrict permissions.
In systems with a relaxed or zero umask, such as container environments, CI/CD runners, embedded systems, or user shells configured with umask 000, this results in ~/.local being created as world‑writable. A local attacker can exploit a race window between nano’s creation of ~/.local and its subsequent creation of more restrictive subdirectories to write attacker‑controlled files into the victim’s XDG directory hierarchy.
This proble
CVEList
Insecure Directory Permissions in GNU nano Leading to Privilege Abuse
cvelistv5·2026-04-28·CVSS 2.1
CVE-2026-40556 [LOW] CWE-732 Insecure Directory Permissions in GNU nano Leading to Privilege Abuse
Insecure Directory Permissions in GNU nano Leading to Privilege Abuse
GNU nano creates the user’s ~/.local directory with overly permissive permissions when the directory does not exist yet. On first use of features requiring Cross-Desktop Group (XDG) data storage, nano explicitly requests directory mode 0777, making the directory world‑writable in environments where the process umask does not sufficiently restrict permissions.
In systems with a relaxed or zero umask, such as container environments, CI/CD runners, embedded systems, or user shells configured with umask 000, this results in ~/.local being created as world‑writable. A local attacker can exploit a race window between nano’s creation of ~/.local and its subsequent creation of more restrictive subdirectories to write attacker‑c
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2026-04-28
Published