{"answers":{"affected":"3 open source packages ship an affected version, including starship. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-41815 exists.","fix":"Upgrade starship to 1.20.0 or later.","what":"CVE-2024-41815 is a high-severity command injection vulnerability in starship, published on 26 Jul 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-2024-41815 and fix it if it is affected.\n\nWhat it is: CVE-2024-41815 is a high-severity command injection vulnerability in starship, published on 26 Jul 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-2024-41815 exists.\n\nAffected packages and fixed versions:\n- starship (crates.io): affected from 1.0.0; fixed in 1.20.0\n- starship (crates.io): affected from 1.0.0; fixed in 1.20.0\n- starship (crates.io): affected from 1.0.1-0; fixed in 1.20.0\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-41815/ (Markdown: https://insights.sbomify.com/CVE-2024-41815/index.md)","id":"CVE-2024-41815","markdown":"https://insights.sbomify.com/CVE-2024-41815/index.md","name":"CVE-2024-41815","record":{"aliases":["GHSA-vx24-x4mv-vwr5","RUSTSEC-2024-0446"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Starship shell prompt","requires_auth":"none","summary":"Attackers can execute arbitrary commands via shell injection in custom commands within the Starship shell prompt, requiring specific user configurations.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"starship","vendor":"starship"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"Starship is a cross-shell prompt. Starting in version 1.0.0 and prior to version 1.20.0, undocumented and unpredictable shell expansion and/or quoting rules make it easily to accidentally cause shell injection when using custom commands with starship in bash. This issue only affects users with custom commands, so the scope is limited, and without knowledge of others' commands, it could be hard to successfully target someone. Version 1.20.0 fixes the vulnerability.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Starship vulnerable to shell injection via undocumented, unpredictable shell expansion in custom commands","id":"CVE-2024-41815","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"command_injection","year":"2024"},"n_packages":3,"n_references":3,"next":{"headline":"WordPress Cooked Plugin Persistent Cross-Site Scripting via Shortcode","id":"CVE-2024-41816"},"packages":[{"ecosystem":"crates.io","fixed":["1.20.0"],"introduced":["1.0.0"],"last_affected":[],"package":"starship","purl":null,"source":"GHSA-vx24-x4mv-vwr5"},{"ecosystem":"crates.io","fixed":["1.20.0"],"introduced":["1.0.0"],"last_affected":[],"package":"starship","purl":"pkg:cargo/starship","source":"GHSA-vx24-x4mv-vwr5"},{"ecosystem":"crates.io","fixed":["1.20.0"],"introduced":["1.0.1-0"],"last_affected":[],"package":"starship","purl":"pkg:cargo/starship","source":"RUSTSEC-2024-0446"}],"prev":{"headline":"txtdot SSRF vulnerability in /proxy","id":"CVE-2024-41813"},"products":["starship"],"published":"2024-07-26","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":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"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":["starship"]},"summary":"Attackers can execute arbitrary commands via shell injection in custom commands within the Starship shell prompt, requiring specific user configurations.","url":"https://insights.sbomify.com/CVE-2024-41815/"}