CVE 2.1 LOW

Insecure Directory Permissions in GNU nano Leading to Privilege Abuse_CVE-2026-40556

2.1 / 10
LOW
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Description

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

Basic Information

ID CVE-2026-40556
Source CERT-PL
Published Apr 28, 2026 at 13:54
Modified Apr 28, 2026 at 14:28

Affected Product

Vendor GNU
Product nano
Version 2.9.1
Affected Versions GNU nano 2.9.1

CWE Classification

References

💭 Join the Security Discussion

🔒 Your email address will not be published. Required fields are marked *

⚠️ Please be respectful and constructive in your comments. Security discussions should remain professional.