Skip to content
CVE PROGRAM SOURCE RECORD6.7 Medium

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

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 products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

nano

Default version status: affected

Red Hat Red Hat Enterprise Linux 8

Default version status: affected

  • 0:2.9.8-3.el8_10 to < *unaffected

Red Hat Red Hat Enterprise Linux 9

Default version status: affected

  • 0:5.6.1-6.el9 to < *unaffected

Red Hat Red Hat Enterprise Linux 10

Default version status: unaffected

Red Hat Red Hat Enterprise Linux 6

Default version status: unknown

Red Hat Red Hat Enterprise Linux 7

Default version status: unknown

References