CVE-2024-5742 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

Vendor Red Hat
Product Red Hat Enterprise Linux 10
Weakness CWE-59
Published June 12, 2024
Last update November 21, 2025

CVSS base score

6.7/10
Attack vector Local
Attack complexity High
Privileges required Low
User interaction Required
Confidentiality High
Integrity High

CVSS vector

CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

What the vulnerability does

01Description

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.

Key dates

02Disclosure timeline

June 12, 2024 CVE published
November 21, 2025 Record updated