CVE-2024-5742 Path traversal in Red Hat Enterprise Linux 10
Attackers can escalate privileges by replacing Nano emergency files with malicious symlinks during a race condition after a crash.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-5742?
CVE-2024-5742 is a medium-severity path traversal vulnerability in Redhat Enterprise Linux, published on 12 Jun 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-59
Which versions are affected by CVE-2024-5742?
It affects 2 products.
Linux distribution packages (19)
nano AlmaLinux:8 | All versions | 2.9.8-3.el8_10 |
nano AlmaLinux:9 | All versions | 5.6.1-6.el9 |
nano Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.8-3.el8_10 |
nano-debuginfo Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.8-3.el8_10 |
nano-debugsource Red Hat:enterprise_linux:8::baseos | All versions | 0:2.9.8-3.el8_10 |
nano Red Hat:enterprise_linux:9::baseos | All versions | 0:5.6.1-6.el9 |
nano-debuginfo Red Hat:enterprise_linux:9::baseos | All versions | 0:5.6.1-6.el9 |
nano-debugsource Red Hat:enterprise_linux:9::baseos | All versions | 0:5.6.1-6.el9 |
nano Rocky Linux:8 | All versions | 0:2.9.8-3.el8_10 |
nano Rocky Linux:9 | All versions | 0:5.6.1-6.el9 |
nano SUSE:Package Hub 15 SP5 | All versions | 7.2-bp156.3.3.1 |
nano SUSE:Package Hub 15 SP5 | All versions | 7.2-bp156.3.3.1 |
nano SUSE:Package Hub 15 SP6 | All versions | 7.2-bp156.3.3.1 |
nano SUSE:Package Hub 15 SP6 | All versions | 7.2-bp156.3.3.1 |
nano openSUSE:Leap 15.5 | All versions | 7.2-bp156.3.3.1 |
nano openSUSE:Leap 15.5 | All versions | 7.2-bp156.3.3.1 |
nano openSUSE:Leap 15.6 | All versions | 7.2-bp156.3.3.1 |
nano openSUSE:Leap 15.6 | All versions | 7.2-bp156.3.3.1 |
nano openSUSE:Tumbleweed | All versions | 8.0-2.1 |
Products include Gnu Nano, Redhat Enterprise Linux.
How do I fix CVE-2024-5742?
Apply the vendor's patch.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-5742 being exploited?
There is no known exploitation of CVE-2024-5742 in the wild and no public exploit code.
Other vulnerabilities in Redhat Enterprise Linux
Sources
Also known as ALSA-2024:6986, ALSA-2024:9430, AZL-42612, AZL-42619, BELL-CVE-2024-5742, CLSA-2026-1779122764 and 15 more.