Skip to content

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

MediumCVSS 6.7 EPSS 0.34%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total
Technology
UbuntuDebianRed Hat

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.

Upgrade path

14 packages: 12 fixed, 1 with no fix yet.

PackageAffectedFixed inStatus
nano All versions No fix listed No fix yet
debian/nano(Debian 12) < 7.2-1+deb12u1; = 7.2-1 7.2-1+deb12u1 Fixed
debian/nano(Debian 13) < 8.0-1 8.0-1 Fixed
debian/nano(Debian 14) < 8.0-1 8.0-1 Fixed
GNU nano >= 2.2.0, < 8.0 8.0 Fixed
Microsoft azure linux < 6.4-2 6.4-2 Fixed
Microsoft cbl mariner < 6.0-3 6.0-3 Fixed
redhat enterprise linux < 0:2.9.8-3.el8_10; < 0:5.6.1-6.el9; = 6.0; = 7.0 +3 more 0:2.9.8-3.el8_10, 0:5.6.1-6.el9 Fixed
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5 Fixed
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5 Fixed
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5 Fixed
ubuntu/nano(Ubuntu 22.04) < 6.2-1ubuntu0.1 6.2-1ubuntu0.1 Fixed
ubuntu/nano(Ubuntu 24.04) < 7.2-2ubuntu0.1 7.2-2ubuntu0.1 Fixed
redhat rhel els = 6; = 7 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
Microsoft azure linux < 6.4-2 6.4-2
Microsoft cbl mariner < 6.0-3 6.0-3
debian/nano(Debian:12) < 7.2-1+deb12u1 7.2-1+deb12u1
debian/nano(Debian:12) = 7.2-1 No fix listed
debian/nano(Debian:13) < 8.0-1 8.0-1
debian/nano(Debian:14) < 8.0-1 8.0-1
ubuntu/nano(Ubuntu:22.04) < 6.2-1ubuntu0.1 6.2-1ubuntu0.1
nano All versions No fix listed
redhat enterprise linux < 0:2.9.8-3.el8_10 0:2.9.8-3.el8_10
redhat enterprise linux < 0:5.6.1-6.el9 0:5.6.1-6.el9
redhat enterprise linux = 10 No fix listed
redhat rhel els = 6 No fix listed
redhat rhel els = 7 No fix listed
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5
ubuntu/nano(Ubuntu:24.04) < 7.2-2ubuntu0.1 7.2-2ubuntu0.1
GNU nano >= 2.2.0, < 8.0 8.0
redhat enterprise linux = 6.0 No fix listed
redhat enterprise linux = 7.0 No fix listed
redhat enterprise linux = 8.0 No fix listed
redhat enterprise linux = 9.0 No fix listed

References