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

Published Apr 21, 2026
·
Updated

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.

Other sources

nano creates ~/.local with mode 0777 instead of 0700. In permissive-umask environments (containers, CI), local attacker can race to inject malicious .desktop launcher. The subsequent mkdir for ~/.local/share correctly uses 0700.

Affected: src/history.c lines 229-234. BZ#2455314. Reported by Michał Majchrowicz and Marcin Wyczechowski, AFINE Team.

Red Hat

Nano: nano: local attacker can inject malicious .desktop launcher due to insecure directory permissions

Microsoft

Affected Software

4 affected componentsFixes available
GNU Nano
Microsoft azl3 nano 6.4-2
Microsoft azl3 nano 6.4-3
debian/nano<=5.4-2+deb11u3, <=7.2-1+deb12u1
8.4-1+deb13u19.0-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/nano to a version that resolves this vulnerability.

    Fixed in 8.4-1+deb13u1Fixed in 9.0-1
  2. Upgrade

    Upgrade nano to a version that resolves this vulnerability.

    Patch BZ#2455314

Event History

Apr 21, 2026
Data Sourced
via Red Hat·08:47 AM
DescriptionSeverityAffected Software
Apr 22, 2026
CVE Published
via MITRE·07:34 AM
Data Sourced
via MITRE·07:34 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 AM
DescriptionSeverityWeakness
May 3, 2026
Data Sourced
via Microsoft·08:02 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:02 AM
DescriptionSeverity
Updated
via Microsoft·08:02 AM
Affected Software
Jun 5, 2026
Data Sourced
via Launchpad·07:54 PM
Description
Data Sourced
via Debian·07:54 PM
DescriptionAffected Software
Jun 6, 2026
Data Sourced
via Ubuntu·07:52 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-6842?

CVE-2026-6842 is classified as a high-severity vulnerability due to its potential exploitation by local attackers.

2

How do I fix CVE-2026-6842?

To mitigate CVE-2026-6842, correct the directory permissions of the ~/.local directory to 0700.

3

Who is affected by CVE-2026-6842?

CVE-2026-6842 affects users of GNU Nano with permissive umask settings that lead to insecure directory permissions.

4

What type of vulnerability is CVE-2026-6842?

CVE-2026-6842 is a local privilege escalation vulnerability that allows attackers to inject malicious .desktop launcher files.

5

Can CVE-2026-6842 be exploited remotely?

No, CVE-2026-6842 can only be exploited by local attackers with access to the system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203