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 (nano)

CVE-2024-5742
MEDIUM 6.7

At a glance

Source
NVD
EPSS
EPSS 0.34 % · percentile 28 ()
State
PUBLISHED
Published
Updated
Assigner
redhat
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-59 — Improper Link Resolution Before File Access

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 6.7CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:Hredhat
CVSS 3.1MEDIUM 6.7CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:HNVD · secalert@redhat.com (Secondary)
CVSS 3.1MEDIUM 6.7CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Secondary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
nano
Red Hat · Red Hat Enterprise Linux 8unaffected 0:2.9.8-3.el8_10 < *
Red Hat · Red Hat Enterprise Linux 9unaffected 0:5.6.1-6.el9 < *
Red Hat · Red Hat Enterprise Linux 10
Red Hat · Red Hat Enterprise Linux 6
Red Hat · Red Hat Enterprise Linux 7

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD