Improper Permissions in GNU Nano Allows Local File Manipulation
CVE-2026-40556
2.1LOW
What is CVE-2026-40556?
GNU Nano improperly sets permissions for the user's ~/.local directory when it is created for the first time. It assigns overly permissive mode 0777, making this directory world-writable, particularly in environments with relaxed umask settings. This poses a significant risk in container environments, CI/CD runners, and certain system configurations where the umask is set to 000. A local attacker can exploit the timing between the creation of ~/.local and subdirectories to inject malicious files into the XDG directory hierarchy, thereby compromising user security.
Affected Version(s)
nano 2.9.1 < 9.0
References
CVSS V4
Score:
2.1
Severity:
LOW
Confidentiality:
None
Integrity:
Low
Availability:
None
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
None
Timeline
Vulnerability published
Vulnerability Reserved
Credit
Michal Majchrowicz (AFINE)
Marcin Wyczechowski (AFINE)