CVE-2024-5742
JSON

6.7medium

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

Severity
6.7medium CVSS:3.1 by redhat
Exploit likelihood
0.35% (higher than 30% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat

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.

Affected

Product or packageVersionsReported by
nanoNot specified
Not affected: from 0:2.9.8-3.el8_10 before *, from 0:5.6.1-6.el9 before *
CVE List
gnu nanofrom 2.2.0 before 8.0NVD
redhat enterprise_linux6.0, 7.0, 8.0, 9.0NVD

All scores

redhat6.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
NVD6.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-59

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Se encontró una vulnerabilidad en GNU Nano que permite una posible escalada de privilegios a través de un archivo temporal inseguro. Si Nano muere mientras edita, un archivo que guarda en un archivo de emergencia con los permisos del usuario que lo ejecuta brinda una ventana de oportunidad para que los atacantes aumenten los privilegios a través de un enlace simbólico malicioso.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-5742 changed 2026-11-25CVE Terms of Use
NVDCVE-2024-5742 changed 2026-11-25Public domain