CVEfocus › CVE database › CVE-2026-6842

CVE-2026-6842Nano: nano: local attacker can inject malicious .desktop launcher due to insecure…

CVSS 2.5 LowEPSS 0.1% (higher than 1% of CVEs)Published 2026-04-22Updated 2026-11-25Assigner: redhat

A flaw was found in nano. In environments with permissive umask settings, a local attacker can exploit incorrect directory permissions (0777 instead of 0700) for the `~/.local` directory. This allows the attacker to inject a malicious `.desktop` launcher, which could lead to unintended actions or information disclosure if the launcher is subsequently processed.

CWE-732

What to do

Fixed builds are available from Debian, Ubuntu: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
8Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04nanoFixed8.7.1-1ubuntu0.1UBUNTU-CVE-2026-6842
Ubuntu 25.10nanoFixed8.4-1ubuntu0.1UBUNTU-CVE-2026-6842
Ubuntu 24.04nanoFixed7.2-2ubuntu0.2UBUNTU-CVE-2026-6842
Ubuntu 22.04nanoFixed6.2-1ubuntu0.2UBUNTU-CVE-2026-6842
Ubuntu 20.04nanoFix pending4.8-1ubuntu1.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2026-6842
Ubuntu 18.04nanoFix pending2.9.3-2ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2026-6842
Debian 14nanoFixed9.0-1DEBIAN-CVE-2026-6842
Debian 13nanoFixed8.4-1+deb13u1DEBIAN-CVE-2026-6842
Debian 12nanoFix pendingDEBIAN-CVE-2026-6842
Red Hat Enterprise Linux 10nanoFix pending
Fix deferred
Red Hat Enterprise Linux 9nanoFix pending
Fix deferred
Red Hat Enterprise Linux 8nanoFix pending
Fix deferred
Red Hat Enterprise Linux 7nanoFix pending
Fix deferred
Red Hat Enterprise Linux 6nanoFix pending
Fix deferred

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Ensure that the system's umask is configured to a secure value, such as `0022` or `0077`, to prevent the creation of world-writable directories. This can be set system-wide in `/etc/profile` or `/etc/bashrc`, or for individual users in their `~/.bashrc` or `~/.profile`. A secure umask will ensure that newly created directories, including `~/.local` by `nano`, have appropriate permissions.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.