Back to CVE records
Medium 6.7Published Jun 12, 2024

CVE-2024-5742Nano: running `chmod` and `chown` on the filename allows malicious user to replace the emergency file with a malicious symlink to a root-owned file

Updated under an hour ago ()

Does this affect you?

It affects Red Hat Enterprise Linux 8 and 4 other products. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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
6.7 MEDIUM (v3.1, CNA)CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-59
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
redhat
NVD analysis
Modified
Record last updated
Oct 15, 2026
First seen by InfoSec Signals
Oct 15, 2026

Affected products

Affected products
Red Hat Red Hat Enterprise Linux 8
redhat:enterprise_linux
from 0:2.9.8-3.el8_10 not affected
CNA record
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
siemens:simatic_s7_1500_cpu_1518_4_pn_dp_mfp (from the name)
from V3.1.0 before V3.1.5
CISA ADP
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
siemens:simatic_s7_1500_cpu_1518f_4_pn_dp_mfp (from the name)
from V3.1.0 before V3.1.5
CISA ADP
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
siemens:siplus_s7_1500_cpu_1518_4_pn_dp_mfp (from the name)
from V3.1.0 before V3.1.5
CISA ADP
gnu nano
gnu:nano
from 2.2.0 before 8.0
NVD
redhat enterprise_linux
redhat:enterprise_linux
6.0; 7.0; 8.0; 9.0
NVD

References

  • vendor-advisory, x-refsource-redhat
  • vendor-advisory, x-refsource-redhat
  • vdb-entry, x-refsource-redhat, vendor-advisory
  • issue-tracking, x-refsource-redhat, vendor-advisory

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.