Medium severity · published Jun 12, 2024
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
6.7
CVSS
0.3%
EPSS
No
On KEV
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 vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 28% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RH
Red Hat Enterprise Linux 6 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 7 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 8 · Red Hat
All versions, or not specified · source: vendor
RH
Red Hat Enterprise Linux 9 · Red Hat
All versions, or not specified · source: vendor
EL
Enterprise Linux · Redhat
6.0; 7.0; 8.0; 9.0 · source: NVD
NA
Nano · Gnu
2.2.0 before 8.0 · source: NVD
SS
SIMATIC S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.0 before V3.1.5; V3.1.0 before V3.1.5 · source: CISA
SS
SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP · Siemens
V3.1.0 before V3.1.5; V3.1.0 before V3.1.5 · source: CISA
SS
SIPLUS S7-1500 CPU 1518-4 PN/DP MFP · Siemens
V3.1.0 before V3.1.5 · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-5742
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-5742
access.redhat.com
https://access.redhat.com/errata/RHSA-2024:6986
access.redhat.com
https://access.redhat.com/errata/RHSA-2024:9430
Vendor Advisory
https://access.redhat.com/security/cve/CVE-2024-5742
Issue Tracking
https://bugzilla.redhat.com/show_bug.cgi?id=2278574
lists.debian.org
https://lists.debian.org/debian-lts-announce/2024/06/msg00006.html
cert-portal.siemens.com
https://cert-portal.siemens.com/productcert/html/ssa-398330.html
More from Red Hat Enterprise Linux 6
8.8
CVE-2025-31277
Apple Multiple Products Buffer Overflow Vulnerability
7.5
CVE-2026-34486
Apache Tomcat: Fix for CVE-2026-29146 allowed bypass of EncryptInterceptor
10.0
CVE-2026-4692
Sandbox escape in the Responsive Design Mode component
10.0
CVE-2026-4689
Sandbox escape due to incorrect boundary conditions, integer overflow in the XPCOM component
10.0
CVE-2026-4688
Sandbox escape due to use-after-free in the Disability Access APIs component
