{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-39331 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2024-39331 is a critical code injection vulnerability in n/a, published on 23 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-39331 and fix it if it is affected.\n\nWhat it is: CVE-2024-39331 is a critical code injection vulnerability in n/a, published on 23 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-39331 in the wild and no public exploit code.\n\nAffected product: n/a. 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-39331/ (Markdown: https://insights.sbomify.com/CVE-2024-39331/index.md)","id":"CVE-2024-39331","markdown":"https://insights.sbomify.com/CVE-2024-39331/index.md","name":"CVE-2024-39331","record":{"aliases":["ALSA-2024:6510","AZL-42868","AZL-42925","CLSA-2024-1728934930","CLSA-2025-1752088235","DEBIAN-CVE-2024-39331","DLA-3848-1","DLA-3849-1","DSA-5718-1","DSA-5719-1","GHSA-hp3p-7892-f222","MGASA-2024-0276","OESA-2024-1816","RHSA-2024:4971","RHSA-2024:6203","RHSA-2024:6510","SUSE-SU-2024:2293-1","SUSE-SU-2024:2567-1","UBUNTU-CVE-2024-39331","openSUSE-SU-2024:14117-1","openSUSE-SU-2026:10228-1","openSUSE-SU-2026:20928-1"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Emacs Org Mode","requires_auth":"none","summary":"Attackers can execute arbitrary code via malicious Org Mode link abbreviations that invoke unsafe functions like shell-command-to-string.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"emacs","vendor":"gnu"}],"cvss":{"score":9.8,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe function, such as shell-command-to-string. This affects Org Mode before 9.7.5.","ecosystems":["AlmaLinux:9","Red Hat:enterprise_linux:9::appstream","Red Hat:rhel_aus:8.6::appstream","Red Hat:rhel_aus:8.6::baseos","Red Hat:rhel_e4s:8.6::appstream","Red Hat:rhel_e4s:8.6::baseos","Red Hat:rhel_eus:8.8::appstream","Red Hat:rhel_eus:8.8::baseos","Red Hat:rhel_tus:8.6::appstream","Red Hat:rhel_tus:8.6::baseos","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise Module for Basesystem 15 SP5","SUSE:Linux Enterprise Module for Basesystem 15 SP6","SUSE:Linux Enterprise Module for Desktop Applications 15 SP5","SUSE:Linux Enterprise Module for Desktop Applications 15 SP6","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","SUSE:Manager Proxy 4.3","SUSE:Manager Server 4.3","openSUSE:Leap 15.5","openSUSE:Leap 15.6","openSUSE:Leap 16.0","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":"Code injection in n/a","id":"CVE-2024-39331","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":80,"n_references":9,"next":{"headline":"Path traversal in n/a","id":"CVE-2024-39332"},"packages":[{"ecosystem":"AlmaLinux:9","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/almalinux/emacs","source":"ALSA-2024:6510"},{"ecosystem":"AlmaLinux:9","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-common","purl":"pkg:rpm/almalinux/emacs-common","source":"ALSA-2024:6510"},{"ecosystem":"AlmaLinux:9","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-filesystem","purl":"pkg:rpm/almalinux/emacs-filesystem","source":"ALSA-2024:6510"},{"ecosystem":"AlmaLinux:9","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid","purl":"pkg:rpm/almalinux/emacs-lucid","source":"ALSA-2024:6510"},{"ecosystem":"AlmaLinux:9","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-nox","purl":"pkg:rpm/almalinux/emacs-nox","source":"ALSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-common","purl":"pkg:rpm/redhat/emacs-common","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-common-debuginfo","purl":"pkg:rpm/redhat/emacs-common-debuginfo","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-debuginfo","purl":"pkg:rpm/redhat/emacs-debuginfo","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-debugsource","purl":"pkg:rpm/redhat/emacs-debugsource","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-filesystem","purl":"pkg:rpm/redhat/emacs-filesystem","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid","purl":"pkg:rpm/redhat/emacs-lucid","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid-debuginfo","purl":"pkg:rpm/redhat/emacs-lucid-debuginfo","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-nox","purl":"pkg:rpm/redhat/emacs-nox","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["1:27.2-10.el9_4"],"introduced":["0"],"last_affected":[],"package":"emacs-nox-debuginfo","purl":"pkg:rpm/redhat/emacs-nox-debuginfo","source":"RHSA-2024:6510"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-common","purl":"pkg:rpm/redhat/emacs-common","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-common-debuginfo","purl":"pkg:rpm/redhat/emacs-common-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-debuginfo","purl":"pkg:rpm/redhat/emacs-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-debugsource","purl":"pkg:rpm/redhat/emacs-debugsource","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid","purl":"pkg:rpm/redhat/emacs-lucid","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid-debuginfo","purl":"pkg:rpm/redhat/emacs-lucid-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-nox","purl":"pkg:rpm/redhat/emacs-nox","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-nox-debuginfo","purl":"pkg:rpm/redhat/emacs-nox-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-terminal","purl":"pkg:rpm/redhat/emacs-terminal","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::baseos","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_aus:8.6::baseos","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-filesystem","purl":"pkg:rpm/redhat/emacs-filesystem","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-common","purl":"pkg:rpm/redhat/emacs-common","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-common-debuginfo","purl":"pkg:rpm/redhat/emacs-common-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-debuginfo","purl":"pkg:rpm/redhat/emacs-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-debugsource","purl":"pkg:rpm/redhat/emacs-debugsource","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid","purl":"pkg:rpm/redhat/emacs-lucid","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-lucid-debuginfo","purl":"pkg:rpm/redhat/emacs-lucid-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-nox","purl":"pkg:rpm/redhat/emacs-nox","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-nox-debuginfo","purl":"pkg:rpm/redhat/emacs-nox-debuginfo","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::appstream","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-terminal","purl":"pkg:rpm/redhat/emacs-terminal","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::baseos","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_e4s:8.6::baseos","fixed":["1:26.1-7.el8_6.5"],"introduced":["0"],"last_affected":[],"package":"emacs-filesystem","purl":"pkg:rpm/redhat/emacs-filesystem","source":"RHSA-2024:4971"},{"ecosystem":"Red Hat:rhel_eus:8.8::appstream","fixed":["1:26.1-10.el8_8.6"],"introduced":["0"],"last_affected":[],"package":"emacs","purl":"pkg:rpm/redhat/emacs","source":"RHSA-2024:6203"}],"prev":{"headline":"Django Path Traversal vulnerability","id":"CVE-2024-39330"},"products":["n/a"],"published":"2024-06-23","related":[{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2007-6109","kev_date_added":null,"published":"2007-12-07"},{"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":"Command injection in emacs","id":"CVE-2023-2491","kev_date_added":null,"published":"2023-05-17"},{"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":"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":"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":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-22","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code via malicious Org Mode link abbreviations that invoke unsafe functions like shell-command-to-string.","url":"https://insights.sbomify.com/CVE-2024-39331/"}