{"answers":{"affected":"3 open source packages ship an affected version, including astropy. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-41334 exists.","fix":"Upgrade astropy to 5.3.3 or later.","what":"CVE-2023-41334 is a high-severity command injection vulnerability in astropy, published on 18 Mar 2024. 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-41334 and fix it if it is affected.\n\nWhat it is: CVE-2023-41334 is a high-severity command injection vulnerability in astropy, published on 18 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-41334 exists.\n\nAffected packages and fixed versions:\n- astropy (PyPI): affected all versions; fixed in 5.3.3\n- astropy (PyPI): affected all versions; fixed in 5.3.3\n- astropy (PyPI): affected all versions; fixed in 5.3.3\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-41334/ (Markdown: https://insights.sbomify.com/CVE-2023-41334/index.md)","id":"CVE-2023-41334","markdown":"https://insights.sbomify.com/CVE-2023-41334/index.md","name":"CVE-2023-41334","record":{"aliases":["DEBIAN-CVE-2023-41334","DLA-3803-1","GHSA-h2x6-5jx5-46hf","MGASA-2024-0313","PYSEC-2026-1199","UBUNTU-CVE-2023-41334","openSUSE-SU-2024:13797-1","openSUSE-SU-2026:11353-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python astronomy library","requires_auth":"none","summary":"A command injection vulnerability in the astropy library allows attackers to execute arbitrary code via the to_dot_graph function.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"astropy","vendor":"astropy"}],"cvss":{"score":8.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/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":"Astropy is a project for astronomy in Python that fosters interoperability between Python astronomy packages. Version 5.3.2 of the Astropy core package is vulnerable to remote code execution due to improper input validation in the `TranformGraph().to_dot_graph` function. A malicious user can provide a command or a script file as a value to the `savelayout` argument, which will be placed as the first value in a list of arguments passed to `subprocess.Popen`.  Although an error will be raised, the command or script will be executed successfully. Version 5.3.3 fixes this issue.","ecosystems":["PyPI","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"astropy vulnerable to RCE in TranformGraph().to_dot_graph function","id":"CVE-2023-41334","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2023"},"n_packages":4,"n_references":3,"next":{"headline":"Temporary storage of plaintext passwords during password changes in matrix synapse","id":"CVE-2023-41335"},"packages":[{"ecosystem":"PyPI","fixed":["5.3.3"],"introduced":["0"],"last_affected":[],"package":"astropy","purl":null,"source":"GHSA-h2x6-5jx5-46hf"},{"ecosystem":"PyPI","fixed":["5.3.3"],"introduced":["0"],"last_affected":[],"package":"astropy","purl":"pkg:pypi/astropy","source":"GHSA-h2x6-5jx5-46hf"},{"ecosystem":"PyPI","fixed":["5.3.3"],"introduced":["0"],"last_affected":[],"package":"astropy","purl":"pkg:pypi/astropy","source":"PYSEC-2026-1199"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["8.0.1-1.1"],"introduced":["0"],"last_affected":[],"package":"python-astropy","purl":"pkg:rpm/opensuse/python-astropy\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11353-1"}],"prev":{"headline":"Bypass of namespace restrictions in CiliumNetworkPolicy","id":"CVE-2023-41333"},"products":["astropy"],"published":"2024-03-18","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"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":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["astropy"]},"summary":"A command injection vulnerability in the astropy library allows attackers to execute arbitrary code via the to_dot_graph function.","url":"https://insights.sbomify.com/CVE-2023-41334/"}