CVE-2026-40556
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2026-40556 is a low-severity directory permission vulnerability in GNU nano that causes the ~/.local directory to be created with overly permissive mode 0777 (world-writable) when it does not yet exist. This occurs on first use of features requiring Cross-Desktop Group (XDG) data storage, and is particularly dangerous in environments with a relaxed or zero umask, such as container environments, CI/CD runners, embedded systems, or shells configured with umask 000. The CVE was published on April 28, 2026, and has subsequently been marked as Rejected by its CVE Numbering Authority. It carries a CVSS v4 base score of 2.1 (Low) (GitHub Advisory, Feedly).

Note: This CVE has been officially rejected/withdrawn by its CVE Numbering Authority. The information below reflects what was reported prior to rejection.

Technical details

The root cause is classified as CWE-732 (Incorrect Permission Assignment for Critical Resource). GNU nano explicitly requests directory mode 0777 when creating ~/.local for XDG data storage, rather than applying a more restrictive mode. In environments where the process umask does not compensate (e.g., umask 000), the resulting directory is world-writable. A local attacker can exploit a race condition window between nano's creation of ~/.local and its subsequent creation of more restrictive subdirectories within it, allowing the attacker to write attacker-controlled files into the victim's XDG directory hierarchy (GitHub Advisory, CERT.pl).

Impact

Successful exploitation allows a local attacker to write arbitrary files into the victim's XDG directory hierarchy (~/.local and subdirectories), potentially leading to unauthorized file placement, privilege escalation, or other forms of local privilege abuse depending on how the compromised files are subsequently used by the system or other applications. The vulnerability has no direct confidentiality or availability impact; the primary risk is integrity compromise of user-level configuration and data files. The impact is most significant in multi-user environments with permissive umask settings, such as shared container environments or CI/CD runners (GitHub Advisory, Feedly).

Exploitability

There is no known public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of reporting. The CVE has been rejected by its CVE Numbering Authority, which may further limit its practical relevance. No threat actor attribution, CISA KEV catalog listing, or EPSS score data is available for this CVE (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify a vulnerable target: Locate a system running GNU nano prior to version 9.0 in an environment with a permissive umask (e.g., umask 000), such as a shared container, CI/CD runner, or embedded system where multiple local users are present.
  2. Wait for or trigger nano's first XDG use: Monitor or induce the victim user to run GNU nano in a way that triggers first-time use of XDG data storage features, causing nano to create ~/.local with mode 0777.
  3. Exploit the race condition: During the brief window between nano's creation of ~/.local (world-writable) and its creation of more restrictive subdirectories, write attacker-controlled files or symlinks into the victim's ~/.local directory hierarchy.
  4. Achieve privilege abuse: Depending on the target environment, the planted files may be loaded by the victim's applications or system services, potentially enabling privilege escalation or persistent unauthorized access (GitHub Advisory, CERT.pl).

Indicators of compromise

  • File System: Presence of ~/.local directory owned by a victim user but with permissions drwxrwxrwx (mode 0777); unexpected files or symlinks in ~/.local or its subdirectories not created by the legitimate user.
  • Logs: Audit log entries (e.g., auditd) showing file creation events in ~/.local by a user other than the directory owner.
  • Process: Unexpected processes writing to another user's ~/.local directory, detectable via tools like inotifywait or auditd file access monitoring.

Mitigation and workarounds

The vulnerability was fixed in GNU nano version 9.0; users should upgrade to this version or later (GitHub Advisory). The fix is available via the nano git repository (commit cb43493e) (nano git). For systems unable to patch immediately, set a stricter umask (e.g., umask 077) to prevent world-writable directory creation. Additionally, enforce proper filesystem permissions at the system level and monitor XDG directories for unauthorized file creation, particularly in container and CI/CD environments. Note that this CVE has been officially rejected, so risk assessment should account for its withdrawn status.

Community reactions

CERT.pl published a post covering CVE-2026-40556 shortly after its disclosure (CERT.pl). The vulnerability received coverage on Malware News and several CVE tracking platforms. Community reaction was limited given the low severity score and the subsequent rejection of the CVE by its numbering authority.

Additional resources


SourceThis report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-9318MEDIUM4.8
  • Linux Debian logoLinux Debian
  • taglib
NoNoAug 12, 2026
CVE-2026-19566NONEN/A
  • Linux Debian logoLinux Debian
  • libnet-cidr-set-perl
NoNoAug 12, 2026
CVE-2026-68450NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-debug-devel
NoYesAug 12, 2026
CVE-2026-68449NONEN/A
  • Linux Debian logoLinux Debian
  • linux
NoYesAug 12, 2026
CVE-2026-68448NONEN/A
  • Linux Debian logoLinux Debian
  • linux
NoYesAug 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management