{"answers":{"affected":"It affects 2 products.","exploited":"There is no known exploitation of CVE-2024-5742 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"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."},"fix_prompt":"Check this codebase for CVE-2024-5742 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2024-5742 in the wild and no public exploit code.\n\nAffected product: Redhat Enterprise Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-5742/ (Markdown: https://insights.sbomify.com/CVE-2024-5742/index.md)","id":"CVE-2024-5742","markdown":"https://insights.sbomify.com/CVE-2024-5742/index.md","name":"CVE-2024-5742","record":{"aliases":["ALSA-2024:6986","ALSA-2024:9430","AZL-42612","AZL-42619","BELL-CVE-2024-5742","CLSA-2026-1779122764","DEBIAN-CVE-2024-5742","DLA-3831-1","GHSA-ffhx-2rrf-9c23","MGASA-2024-0223","OESA-2024-1735","RHSA-2024:6986","RHSA-2024:9430","RLSA-2024:6986","RLSA-2024:9430","UBUNTU-CVE-2024-5742","USN-7064-1","USN-7064-2","openSUSE-SU-2024:0157-1","openSUSE-SU-2024:0157-2","openSUSE-SU-2024:14034-1"],"analysis":{"component_type":"operating_system","fix_type":"patch","impacts":["privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"GNU Nano text editor","requires_auth":"low_privilege","summary":"Attackers can escalate privileges by replacing Nano emergency files with malicious symlinks during a race condition after a crash.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"nano","vendor":"gnu"},{"product":"enterprise_linux","vendor":"redhat"}],"cvss":{"score":6.7,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Red Hat:enterprise_linux:8::baseos","Red Hat:enterprise_linux:9::baseos","Rocky Linux:8","Rocky Linux:9","SUSE:Package Hub 15 SP5","SUSE:Package Hub 15 SP6","openSUSE:Leap 15.5","openSUSE:Leap 15.6","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Path traversal in Red Hat Enterprise Linux 10","id":"CVE-2024-5742","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"redhat:enterprise_linux","products":["redhat:enterprise_linux"],"type":"path_traversal","year":"2024"},"n_packages":19,"n_references":4,"next":{"headline":"Command Injection Vulnerability","id":"CVE-2024-5743"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["2.9.8-3.el8_10"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/almalinux/nano","source":"ALSA-2024:6986"},{"ecosystem":"AlmaLinux:9","fixed":["5.6.1-6.el9"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/almalinux/nano","source":"ALSA-2024:9430"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:2.9.8-3.el8_10"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/redhat/nano","source":"RHSA-2024:6986"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:2.9.8-3.el8_10"],"introduced":["0"],"last_affected":[],"package":"nano-debuginfo","purl":"pkg:rpm/redhat/nano-debuginfo","source":"RHSA-2024:6986"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:2.9.8-3.el8_10"],"introduced":["0"],"last_affected":[],"package":"nano-debugsource","purl":"pkg:rpm/redhat/nano-debugsource","source":"RHSA-2024:6986"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:5.6.1-6.el9"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/redhat/nano","source":"RHSA-2024:9430"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:5.6.1-6.el9"],"introduced":["0"],"last_affected":[],"package":"nano-debuginfo","purl":"pkg:rpm/redhat/nano-debuginfo","source":"RHSA-2024:9430"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:5.6.1-6.el9"],"introduced":["0"],"last_affected":[],"package":"nano-debugsource","purl":"pkg:rpm/redhat/nano-debugsource","source":"RHSA-2024:9430"},{"ecosystem":"Rocky Linux:8","fixed":["0:2.9.8-3.el8_10"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/rocky-linux/nano?distro=rocky-linux-8\u0026epoch=0","source":"RLSA-2024:6986"},{"ecosystem":"Rocky Linux:9","fixed":["0:5.6.1-6.el9"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/rocky-linux/nano?distro=rocky-linux-9\u0026epoch=0","source":"RLSA-2024:9430"},{"ecosystem":"SUSE:Package Hub 15 SP5","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/suse/nano\u0026distro=SUSE%20Package%20Hub%2015%20SP5","source":"openSUSE-SU-2024:0157-1"},{"ecosystem":"SUSE:Package Hub 15 SP5","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/suse/nano\u0026distro=SUSE%20Package%20Hub%2015%20SP5","source":"openSUSE-SU-2024:0157-2"},{"ecosystem":"SUSE:Package Hub 15 SP6","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/suse/nano\u0026distro=SUSE%20Package%20Hub%2015%20SP6","source":"openSUSE-SU-2024:0157-1"},{"ecosystem":"SUSE:Package Hub 15 SP6","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/suse/nano\u0026distro=SUSE%20Package%20Hub%2015%20SP6","source":"openSUSE-SU-2024:0157-2"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/opensuse/nano\u0026distro=openSUSE%20Leap%2015.5","source":"openSUSE-SU-2024:0157-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/opensuse/nano\u0026distro=openSUSE%20Leap%2015.5","source":"openSUSE-SU-2024:0157-2"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/opensuse/nano\u0026distro=openSUSE%20Leap%2015.6","source":"openSUSE-SU-2024:0157-1"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["7.2-bp156.3.3.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/opensuse/nano\u0026distro=openSUSE%20Leap%2015.6","source":"openSUSE-SU-2024:0157-2"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["8.0-2.1"],"introduced":["0"],"last_affected":[],"package":"nano","purl":"pkg:rpm/opensuse/nano\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14034-1"}],"prev":{"headline":"XSS in inventory view","id":"CVE-2024-5741"},"products":["Red Hat Enterprise Linux 10","Red Hat Enterprise Linux 6","Red Hat Enterprise Linux 7","Red Hat Enterprise Linux 8","Red Hat Enterprise Linux 9"],"published":"2024-06-12","related":[{"cvss_score":5.5,"headline":"Nano: nano: format string vulnerability leads to denial of service","id":"CVE-2026-6843","kev_date_added":null,"published":"2026-04-22"},{"cvss_score":3.7,"headline":"Race condition in n/a","id":"CVE-2010-1161","kev_date_added":null,"published":"2010-04-16"},{"cvss_score":1.9,"headline":"Path traversal in n/a","id":"CVE-2010-1160","kev_date_added":null,"published":"2010-04-16"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-15","vendors":["Red Hat"]},"summary":"Attackers can escalate privileges by replacing Nano emergency files with malicious symlinks during a race condition after a crash.","url":"https://insights.sbomify.com/CVE-2024-5742/"}