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

MEDIUM
6.7
CVSS Score
Published: June 12, 2024 at 08:53 AM UTC
Updated: October 15, 2026 at 01:19 AM UTC
2 products affected across 2 vendorsEnterprise LinuxNano

Using N/A by N/A?

Get instant alerts when new vulnerabilities affect N/A - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.7
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.2.0 ≤ v < 8.0
Affected range stops below 8.0, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 0:2.9.8-3.el8_10 (unaffected)
Vendor states this is fixed in 0:5.6.1-6.el9 (unaffected)
Vendor states this is fixed in 10 (unaffected)
Vendor states this is fixed in 6 (unknown)
Vendor states this is fixed in 7 (unknown)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (6)

VDB Entryx_refsource_REDHATVendor Advisory
https://access.redhat.com/security/cve/CVE-2024-5742
Issue Trackingx_refsource_REDHATVendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2278574
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2024/06/msg00006.html
Source: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
https://cert-portal.siemens.com/productcert/html/ssa-398330.html

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

6.7MEDIUMredhat
Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-59

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card