CWE
59
EPSS
0.045%
Advisory Published
CVE Published
Updated

CVE-2024-5742: 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

First published: Thu May 02 2024(Updated: )

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.

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
redhat/nano<8.0
8.0
debian/nano
5.4-2+deb11u3
7.2-1+deb12u1
8.3-1
GNU nano>=2.2.0<8.0
Red Hat Enterprise Linux=6.0
Red Hat Enterprise Linux=7.0
Red Hat Enterprise Linux=8.0
Red Hat Enterprise Linux=9.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2024-5742?

    The severity of CVE-2024-5742 is classified as a privilege escalation vulnerability.

  • How do I fix CVE-2024-5742?

    To fix CVE-2024-5742, update GNU Nano to version 8.0 or above.

  • Which versions of GNU Nano are affected by CVE-2024-5742?

    CVE-2024-5742 affects GNU Nano versions prior to 8.0.

  • Can CVE-2024-5742 affect Red Hat Enterprise Linux?

    Yes, CVE-2024-5742 can potentially affect Red Hat Enterprise Linux versions 6.0 to 8.0.

  • What kind of attacks can CVE-2024-5742 facilitate?

    CVE-2024-5742 may allow attackers to escalate privileges under certain conditions during file editing.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203