{"id":"CVE-2024-5742","aliases":["CVE-2024-5742"],"related":[],"kind":"vulnerability","state":"published","title":"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","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-06-12T08:53:02.256Z","modified":"2026-11-25T14:17:05.887Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":6.7,"rating":"MEDIUM"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":6.7,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","score":6.7,"rating":"MEDIUM"}],"cwes":["CWE-59"],"affected":[{"ranges":[],"package":"nano","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:2.9.8-3.el8_10","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"nano","cpe":"cpe:/o:redhat:enterprise_linux:8::baseos","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:5.6.1-6.el9","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"nano","cpe":"cpe:/o:redhat:enterprise_linux:9::baseos","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"nano","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","package":"nano","cpe":"cpe:/o:redhat:rhel_els:6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","package":"nano","cpe":"cpe:/o:redhat:rhel_els:7","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.2.0","fixed":"8.0"}],"vendor":"gnu","product":"nano","cpe":"cpe:2.3:a:gnu:nano:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"6.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"8.0"},{"status":"affected","version":"9.0"}],"vendor":"redhat","product":"enterprise_linux","cpe":"cpe:2.3:o:redhat:enterprise_linux:6.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2024:6986","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2024:9430","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2024-5742","tags":["vdb-entry","vendor-advisory","x-refsource-redhat","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2278574","tags":["issue-tracking","vendor-advisory","x-refsource-redhat","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00006.html","tags":["x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-10-07T20:27:39.384Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-5742","url":"https://www.cve.org/CVERecord?id=CVE-2024-5742","licence":"CVE Terms of Use","modified":"2026-11-25T13:57:35.355Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-5742","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5742","licence":"Public domain","modified":"2026-11-25T14:17:05.887Z"}],"updatedAt":"2026-11-25T23:18:23.503Z","epss":{"score":0.00348,"percentile":0.30462,"date":"2026-12-01T12:00:22.000Z"}}