CVE-2024-5742
published 2024-06-12CVE-2024-5742: 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…
PriorityP431medium6.7CVSS 3.1
AVLACHPRLUIRSUCHIHAH
EPSS
0.35%
26.8th percentile
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.
Affected
16 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | nano | < nano 7.2-1+deb12u1 (bookworm) | nano 7.2-1+deb12u1 (bookworm) |
| gnu | nano | >= 0 < 5.4-2+deb11u3 | 5.4-2+deb11u3 |
| gnu | nano | >= 0 < 7.2-1+deb12u1 | 7.2-1+deb12u1 |
| gnu | nano | >= 0 < 8.0-1 | 8.0-1 |
| gnu | nano | >= 0 < 8.0-1 | 8.0-1 |
| gnu | nano | >= 2.2.0 < 8.0 | 8.0 |
| msrc | azl3_nano_6.4-2_on_azure_linux_3.0 | — | — |
| msrc | azure_linux_3.0_arm | — | — |
| msrc | azure_linux_3.0_x64 | — | — |
| msrc | cbl2_nano_6.0-3_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
CVSS provenance
nvdv3.16.7MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
osv6.7MEDIUM
vendor_debian6.7MEDIUM
vendor_msrc6.7MEDIUM
vendor_redhat6.7MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
nano vulnerability
vendor_ubuntu·2024-10-29
CVE-2024-5742 nano vulnerability
Title: nano vulnerability
Summary: nano could be made to give users administrator privileges.
USN-7064-1 fixed a vulnerability in nano. This update provides the
corresponding update for Ubuntu 14.04 LTS.
Original advisory details:
It was discovered that nano allowed a possible privilege escalation
through an insecure temporary file. If nano was killed while editing, the
permissions granted to the emergency save file could be used by an
attacker to escalate privileges using a malicious symlink.
Instructions: In general, a standard system update will make all the necessary changes.
Ubuntu
nano vulnerability
vendor_ubuntu·2024-10-15
CVE-2024-5742 nano vulnerability
Title: nano vulnerability
Summary: nano could be made to give users administrator privileges.
It was discovered that nano allowed a possible privilege escalation
through an insecure temporary file. If nano was killed while editing, the
permissions granted to the emergency save file could be used by an
attacker to escalate privileges using a malicious symlink.
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
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
vendor_msrc·2024-06-11·CVSS 6.7
CVE-2024-5742 [MEDIUM] CWE-59 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
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
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
redhat: redh
Red Hat
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
vendor_redhat·2024-04-28·CVSS 6.7
CVE-2024-5742 [MEDIUM] CWE-59 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
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
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.
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 sym
Debian
CVE-2024-5742: nano - A vulnerability was found in GNU Nano that allows a possible privilege escalatio...
vendor_debian·2024·CVSS 6.7
CVE-2024-5742 [MEDIUM] CVE-2024-5742: nano - A vulnerability was found in GNU Nano that allows a possible privilege escalatio...
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.
Scope: local
bookworm: resolved (fixed in 7.2-1+deb12u1)
bullseye: resolved (fixed in 5.4-2+deb11u3)
forky: resolved (fixed in 8.0-1)
sid: resolved (fixed in 8.0-1)
trixie: resolved (fixed in 8.0-1)
GHSA
GHSA-ffhx-2rrf-9c23: A vulnerability was found in GNU Nano that allows a possible privilege escalation through an insecure temporary file
ghsa_unreviewed·2024-06-12
CVE-2024-5742 [MEDIUM] CWE-377 GHSA-ffhx-2rrf-9c23: A vulnerability was found in GNU Nano that allows a possible privilege escalation through an insecure temporary file
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.
OSV
CVE-2024-5742: A vulnerability was found in GNU Nano that allows a possible privilege escalation through an insecure temporary file
osv·2024-06-12·CVSS 6.7
CVE-2024-5742 [MEDIUM] CVE-2024-5742: A vulnerability was found in GNU Nano that allows a possible privilege escalation through an insecure temporary file
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://access.redhat.com/errata/RHSA-2024:6986https://access.redhat.com/errata/RHSA-2024:9430https://access.redhat.com/security/cve/CVE-2024-5742https://bugzilla.redhat.com/show_bug.cgi?id=2278574https://access.redhat.com/security/cve/CVE-2024-5742https://bugzilla.redhat.com/show_bug.cgi?id=2278574https://lists.debian.org/debian-lts-announce/2024/06/msg00006.html
2024-06-12
Published