CVE-2024-5742Nano: running `chmod` and `chown` on the filename allows malicious user to replace the emergency file with a malicious symlink to a root-owned file
- 6.7MediumCVSS base score
- 0.34%Exploitation in 30 daysEPSS · top 72% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By redhat
- 5 days later
· 5 days later
Published
- 2 years later
· 2 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium6.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | Medium6.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.34% · top 72% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.7.
Affected products
nano
All versions: affected
Red Hat · Red Hat Enterprise Linux 8
- unaffected 0:2.9.8-3.el8_10 – < *
Red Hat · Red Hat Enterprise Linux 9
- unaffected 0:5.6.1-6.el9 – < *
Red Hat · Red Hat Enterprise Linux 10
All versions: unaffected
Red Hat · Red Hat Enterprise Linux 6
All versions: unknown
Red Hat · Red Hat Enterprise Linux 7
All versions: unknown
References
References6
- RHSA-2024:6986 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2024:9430 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-5742 (opens in a new tab)vdb-entryx_refsource_REDHATx_transferred
- RHBZ#2278574 (opens in a new tab)issue-trackingx_refsource_REDHATx_transferred
- https://lists.debian.org/debian-lts-announce/2024/06/msg00006.html (opens in a new tab)x_transferred
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-47130 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-5742)Record last updated .