CVE-2024-5742: Nano: running `chmod` and `chown` on the filename allows malicious user to replace the emergency file with a malicious symlink to a root-owned file
Vulnerability summary
CVE-2024-5742 is a medium (CVSS 6.7) vulnerability in gnu nano. EPSS estimates a 0.35% chance of exploitation in the next 30 days, higher than 30.4% of scored vulnerabilities.
Not severe (CVSS 6.7, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 12-06-2024PublishedVulnerability first disclosed.
- 25-11-2026Last modifiedVulnerability information updated.
Description
A vulnerability was found in GNU Nano that allows a possible privilege escalation through an insecure temporary file. If Nano is killed while editing, a file it saves to an emergency file with the permissions of the running user provides a window of opportunity for attackers to escalate privileges through a malicious symlink.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · Red hatEcosystem advisory · calculated6.7MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated6.7MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated6.7MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
- NVDNIST6.7MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.35%
Chance of exploitation in the next 30 days
Percentile
30%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.34% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat4 products
- enterprise_linuxEOL6.0 | 7.0 | 8.0 | 9.0
- nano< 0:2.9.8-3.el8_10 | < 0:5.6.1-6.el9
- nano-debuginfo< 0:2.9.8-3.el8_10 | < 0:5.6.1-6.el9
- nano-debugsource< 0:2.9.8-3.el8_10 | < 0:5.6.1-6.el9
Opensuse3 products
- nano&distro=openSUSE Leap 15.5< 7.2-bp156.3.3.1
- nano&distro=openSUSE Leap 15.6< 7.2-bp156.3.3.1
- nano&distro=openSUSE Tumbleweed< 8.0-2.1
Suse2 products
- nano&distro=SUSE Package Hub 15 SP5< 7.2-bp156.3.3.1
- nano&distro=SUSE Package Hub 15 SP6< 7.2-bp156.3.3.1
Debian1 product
- nano< 3.2-3+deb10u1 | < 7.2-1+deb12u1 | < 8.0-1
Gnu1 product
- nano≥ 2.2.0, < 8.0
Mageia1 product
- nano< 7.2-1.1.mga9
Ubuntu1 product
- nano< 2.2.6-1ubuntu1+esm1 | < 2.5.3-2ubuntu2+esm1 | < 2.9.3-2ubuntu0.1~esm1 | < 4.8-1ubuntu1.1 | < 6.2-1ubuntu0.1 | < 7.2-2ubuntu0.1
7 vendors · 13 products
References
23 links- lists.opensuse.org/archives/…Advisory
Show all 23 references
- lists.opensuse.org/archives/…Advisory