CVE-2024-5742 json
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
published 2024-06-12 2 y ago modified 2026-11-06 2 d ago also EUVD-2024-47130
- cvss
- 6.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 28%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Red Hat Red Hat Enterprise Linux 8 0:2.9.8-3.el8_10
- Red Hat Red Hat Enterprise Linux 9 0:5.6.1-6.el9
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP V3.1.5
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
- nano Debian 12 7.2-1+deb12u1
- nano Debian 14, Debian 13 8.0-1
debian advisories DEBIAN-CVE-2024-5742
- nano Ubuntu 20.04 LTS 4.8-1ubuntu1.1
- nano Ubuntu 22.04 LTS 6.2-1ubuntu0.1
- nano Ubuntu 24.04 LTS 7.2-2ubuntu0.1
- nano Ubuntu Pro 14.04 LTS 2.2.6-1ubuntu1+esm1
- nano Ubuntu Pro 16.04 LTS 2.5.3-2ubuntu2+esm1
- nano Ubuntu Pro 18.04 LTS 2.9.3-2ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2024-5742
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- nano RHEL 9 5.6.1-6.el9
- nano RHEL 8 2.9.8-3.el8_10
red hat advisories RHSA-2024:9430RHSA-2024:6986
- nano openSUSE Tumbleweed 8.0-2.1
- nano Package Hub 15 SP6, Package Hub 15 SP5, openSUSE Leap 15.6 +1 more 7.2-bp156.3.3.1
opensuse advisories openSUSE-SU-2024:14034-1openSUSE-SU-2024:0157-1openSUSE-SU-2024:0157-2
- nano AlmaLinux 9 5.6.1-6.el9
- nano AlmaLinux 8 2.9.8-3.el8_10
almalinux advisories ALSA-2024:9430ALSA-2024:6986
- nano Rocky Linux 9 5.6.1-6.el9
- nano Rocky Linux 8 2.9.8-3.el8_10
rocky linux advisories RLSA-2024:9430RLSA-2024:6986
- nano Azure Linux 3.0 6.4-2
- nano CBL-Mariner 2.0 6.0-3
azure linux advisories AZL-42612AZL-42619
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-5742 updated cvss 6.7
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
-
Red Hat Enterprise Linux 6 nano Red Hat Enterprise Linux 7 nanoaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux BaseOS (v. 8) nano 2.9.8-3.el8_10fixed: vendor fix RHSA-2024:6986
-
Red Hat Enterprise Linux BaseOS (v. 9) nano 5.6.1-6.el9fixed: vendor fix RHSA-2024:9430
-
Red Hat Enterprise Linux 10 nanonot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-23-348-10 updated cvss 4.7
Siemens SIMATIC S7-1500
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.0, < 3.1.5affected: fixed in V3.1.5, mitigation support.industry.siemens.com
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.34% chance of exploitation in the next 30 days, higher than 28% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H |
Affected products
- Red Hat Red Hat Enterprise Linux 8
- Red Hat Red Hat Enterprise Linux 9
- Red Hat Red Hat Enterprise Linux 10
- Red Hat Red Hat Enterprise Linux 6
- Red Hat Red Hat Enterprise Linux 7
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
Classification
- Weakness
-
- CWE-59 Improper Link Resolution Before File Access
References
-
access.redhat.com
/errata/RHSA-2024:6986
vendor-advisory
-
access.redhat.com
/errata/RHSA-2024:9430
vendor-advisory
-
access.redhat.com
/security/cve/CVE-2024-5742
vdb-entry, vendor-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=2278574
issue-tracking, vendor-advisory
- lists.debian.org /debian-lts-announce/2024/06/msg00006.html
- cert-portal.siemens.com /productcert/html/ssa-398330.html
Sources
- CVE List CVE-2024-5742
- NVD CVE-2024-5742
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.