{"id":"CVE-2024-5742","title":"A vulnerability was found in GNU Nano that allows a possible privilege escalation through an insecure temporary 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…","severity":"medium","cvss":6.7,"cvssVector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-59"],"vendor":"gnu","product":"nano","affected":["nano >= 2.2.0, < 8.0","enterprise_linux = 6.0","enterprise_linux = 7.0","enterprise_linux = 8.0","enterprise_linux = 9.0"],"patched":["nano 8.0"],"published":"2024-06-12","updated":"2026-10-15","sourceUpdated":"2026-10-15T01:19:18.190","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2024-5742","references":[{"url":"https://access.redhat.com/errata/RHSA-2024:6986","label":"secalert@redhat.com"},{"url":"https://access.redhat.com/errata/RHSA-2024:9430","label":"secalert@redhat.com"},{"url":"https://access.redhat.com/security/cve/CVE-2024-5742","label":"secalert@redhat.com"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2278574","label":"secalert@redhat.com"},{"url":"https://access.redhat.com/security/cve/CVE-2024-5742","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2278574","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00006.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","label":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"}],"tags":["nvd","cve.org"],"epss":0.00344,"epssPercentile":0.27784,"ingestedAt":"2026-10-15T03:30:12.703Z","ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2024-10-07T20:27:39.384448Z"},"slug":"CVE-2024-5742","body":"## Overview\n\nA 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.\n\n## Affected\n\n- `nano >= 2.2.0, < 8.0`\n- `enterprise_linux = 6.0`\n- `enterprise_linux = 7.0`\n- `enterprise_linux = 8.0`\n- `enterprise_linux = 9.0`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `nano 8.0`","depth":"sunlit","depthScore":37,"depthScoreParts":{"impact":36.9,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}