🔐 CVE Alert

CVE-2026-40556

UNKNOWN 0.0

Insecure Directory Permissions in GNU nano Leading to Privilege Abuse

CVSS Score
0.0
EPSS Score
0.0%
EPSS Percentile
0th

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

CWE CWE-732
Vendor gnu
Product nano
Published Apr 28, 2026
Last Updated Apr 28, 2026
Stay Ahead of the Next One

Get instant alerts for gnu nano

Be the first to know when new unknown vulnerabilities affecting gnu nano are published — delivered to Slack, Telegram or Discord.

Get Free Alerts → Free · No credit card · 60 sec setup

Affected Versions

GNU / nano
2.9.1 < 9.0

References

NVD ↗ CVE.org ↗ EPSS Data ↗
cert.pl: https://cert.pl/en/posts/2026/04/CVE-2026-40556/ nano-editor.org: https://www.nano-editor.org/ cgit.git.savannah.gnu.org: https://cgit.git.savannah.gnu.org/cgit/nano.git/commit/?id=cb43493e

Credits

Michal Majchrowicz (AFINE) Marcin Wyczechowski (AFINE)