{"answers":{"affected":"It affects 5 products.","exploited":"There is no known exploitation of CVE-2023-2491 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2023-2491 is a high-severity command injection vulnerability in Redhat Enterprise Linux, published on 17 May 2023. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-2491 and fix it if it is affected.\n\nWhat it is: CVE-2023-2491 is a high-severity command injection vulnerability in Redhat Enterprise Linux, published on 17 May 2023. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-2491 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-2023-2491/ (Markdown: https://insights.sbomify.com/CVE-2023-2491/index.md)","id":"CVE-2023-2491","markdown":"https://insights.sbomify.com/CVE-2023-2491/index.md","name":"CVE-2023-2491","record":{"aliases":["GHSA-2hj6-9wp7-hvmh","RHSA-2023:3104"],"analysis":{"component_type":"desktop_application","fix_type":"patch","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Emacs text editor","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary commands via crafted org-mode code in Emacs, requiring users to apply vendor patches.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"emacs","vendor":"gnu"},{"product":"enterprise_linux","vendor":"redhat"},{"product":"enterprise_linux_eus","vendor":"redhat"},{"product":"enterprise_linux_server_aus","vendor":"redhat"},{"product":"enterprise_linux_server_tus","vendor":"redhat"}],"cvss":{"score":7.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"A flaw was found in the Emacs text editor. Processing a specially crafted org-mode code with the \"org-babel-execute:latex\" function in ob-latex.el can result in arbitrary command execution. This CVE exists because of a CVE-2023-28617 security regression for the emacs package in Red Hat Enterprise Linux 8.8 and Red Hat Enterprise Linux 9.2.","ecosystems":["Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:8::baseos"],"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":"Command injection in emacs","id":"CVE-2023-2491","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"redhat:enterprise_linux","products":["redhat:enterprise_linux","redhat:enterprise_linux_eus","redhat:enterprise_linux_server_aus","redhat:enterprise_linux_server_tus"],"type":"command_injection","year":"2023"},"n_packages":12,"n_references":4,"next":{"headline":"QueryWall: Plug'n Play Firewall \u003c= 1.1.1 - Admin+ SQLi","id":"CVE-2023-2492"},"packages":[{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-common","purl":"pkg:rpm/redhat/emacs-common","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-common-debuginfo","purl":"pkg:rpm/redhat/emacs-common-debuginfo","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-debuginfo","purl":"pkg:rpm/redhat/emacs-debuginfo","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-debugsource","purl":"pkg:rpm/redhat/emacs-debugsource","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid","purl":"pkg:rpm/redhat/emacs-lucid","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid-debuginfo","purl":"pkg:rpm/redhat/emacs-lucid-debuginfo","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-nox","purl":"pkg:rpm/redhat/emacs-nox","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-nox-debuginfo","purl":"pkg:rpm/redhat/emacs-nox-debuginfo","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-terminal","purl":"pkg:rpm/redhat/emacs-terminal","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2023:3104"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["1:26.1-10.el8_8.2"],"introduced":["0"],"last_affected":[],"package":"emacs-filesystem","purl":"pkg:rpm/redhat/emacs-filesystem","source":"RHSA-2023:3104"}],"prev":{"headline":"WordPress UserAgent-Spy Plugin \u003c= 1.3.1 is vulnerable to Cross Site Scripting (XSS)","id":"CVE-2023-2490"},"products":["emacs"],"published":"2023-05-17","related":[{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2007-6109","kev_date_added":null,"published":"2007-12-07"},{"cvss_score":9.8,"headline":"Code injection in n/a","id":"CVE-2024-39331","kev_date_added":null,"published":"2024-06-23"},{"cvss_score":7.8,"headline":"Code injection in n/a","id":"CVE-2024-53920","kev_date_added":null,"published":"2024-11-27"},{"cvss_score":7.8,"headline":"Code injection in n/a","id":"CVE-2024-30202","kev_date_added":null,"published":"2024-03-25"},{"cvss_score":7.8,"headline":"emacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to shell command injections through a crafted mailto: URI.","id":"CVE-2023-27985","kev_date_added":null,"published":"2023-03-09"},{"cvss_score":7.8,"headline":"emacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to Emacs Lisp code injections through a crafted mailto: URI with unescaped","id":"CVE-2023-27986","kev_date_added":null,"published":"2023-03-09"}],"sources":[{"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":"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":"2025-01-22","vendors":["n/a"]},"summary":"Attackers can execute arbitrary commands via crafted org-mode code in Emacs, requiring users to apply vendor patches.","url":"https://insights.sbomify.com/CVE-2023-2491/"}