{"answers":{"affected":"3 open source packages ship an affected version, including gix-path.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45405 exists.","fix":"Upgrade gix-path to 0.10.11 or later.","what":"CVE-2024-45405 is a medium-severity path traversal vulnerability in Byron gitoxide, published on 6 Sep 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-45405 and fix it if it is affected.\n\nWhat it is: CVE-2024-45405 is a medium-severity path traversal vulnerability in Byron gitoxide, published on 6 Sep 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-45405 exists.\n\nAffected packages and fixed versions:\n- gix-path (crates.io): affected all versions; fixed in 0.10.11\n- gix-path (crates.io): affected all versions; fixed in 0.10.11\n- gix-path (crates.io): affected from 0.0.0-0; fixed in 0.10.11\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-45405/ (Markdown: https://insights.sbomify.com/CVE-2024-45405/index.md)","id":"CVE-2024-45405","markdown":"https://insights.sbomify.com/CVE-2024-45405/index.md","name":"CVE-2024-45405","record":{"aliases":["DEBIAN-CVE-2024-45405","GHSA-m8rp-vv92-46c7","RUSTSEC-2024-0371","SUSE-SU-2024:3748-1","UBUNTU-CVE-2024-45405","openSUSE-SU-2024:14353-1","openSUSE-SU-2024:14355-1","openSUSE-SU-2024:14359-1","openSUSE-SU-2024:14363-1","openSUSE-SU-2024:14364-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Rust git library","requires_auth":"low_privilege","summary":"A local attacker can inject configuration leading to code execution by exploiting improper path resolution in gix-path when Git reports quoted paths.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-427","name":"Uncontrolled Search Path Element"},{"id":"CWE-41","name":"Improper Resolution of Path Equivalence"}],"description":"`gix-path` is a crate of the `gitoxide` project (an implementation of `git` written in Rust) dealing paths and their conversions. Prior to version 0.10.11, `gix-path` runs `git` to find the path of a configuration file associated with the `git` installation, but improperly resolves paths containing unusual or non-ASCII characters, in rare cases enabling a local attacker to inject configuration leading to code execution. Version 0.10.11 contains a patch for the issue.\n\nIn `gix_path::env`, the underlying implementation of the `installation_config` and `installation_config_prefix` functions calls `git config -l --show-origin` to find the path of a file to treat as belonging to the `git` installation. Affected versions of `gix-path` do not pass `-z`/`--null` to cause `git` to report literal paths. Instead, to cover the occasional case that `git` outputs a quoted path, they attempt to parse the path by stripping the quotation marks. The problem is that, when a path is quoted, it may change in substantial ways beyond the concatenation of quotation marks. If not reversed, these changes can result in another valid path that is not equivalent to the original.\n\nOn a single-user system, it is not possible to exploit this, unless `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL` have been set to unusual values or Git has been installed in an unusual way. Such a scenario is not expected. Exploitation is unlikely even on a multi-user system, though it is plausible in some uncommon configurations or use cases. In general, exploitation is more likely to succeed if users are expected to install `git` themselves, and are likely to do so in predictable locations; locations where `git` is installed, whether due to usernames in their paths or otherwise, contain characters that `git` quotes by default in paths, such as non-English letters and accented letters; a custom `system`-scope configuration file is specified with the `GIT_CONFIG_SYSTEM` environment variable, and its path is in an unusual location or has strangely named components; or a `system`-scope configuration file is absent, empty, or suppressed by means other than `GIT_CONFIG_NOSYSTEM`. Currently, `gix-path` can treat a `global`-scope configuration file as belonging to the installation if no higher scope configuration file is available. This increases the likelihood of exploitation even on a system where `git` is installed system-wide in an ordinary way. However, exploitation is expected to be very difficult even under any combination of those factors.","ecosystems":["crates.io","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":"weaponised"},"has_fix":true,"headline":"gix-path improperly resolves configuration path reported by Git","id":"CVE-2024-45405","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":9,"n_references":3,"next":{"headline":"Craft CMS stored XSS in breadcrumb list and title fields","id":"CVE-2024-45406"},"packages":[{"ecosystem":"crates.io","fixed":["0.10.11"],"introduced":["0"],"last_affected":[],"package":"gix-path","purl":null,"source":"GHSA-m8rp-vv92-46c7"},{"ecosystem":"crates.io","fixed":["0.10.11"],"introduced":["0"],"last_affected":[],"package":"gix-path","purl":"pkg:cargo/gix-path","source":"GHSA-m8rp-vv92-46c7"},{"ecosystem":"crates.io","fixed":["0.10.11"],"introduced":["0.0.0-0"],"last_affected":[],"package":"gix-path","purl":"pkg:cargo/gix-path","source":"RUSTSEC-2024-0371"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["0.10.3~git0.ee7d7ef-150600.3.3.1"],"introduced":["0"],"last_affected":[],"package":"cargo-c","purl":"pkg:rpm/opensuse/cargo-c\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2024:3748-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["0.20.0~git66.972ac93-3.1"],"introduced":["0"],"last_affected":[],"package":"cargo-audit","purl":"pkg:rpm/opensuse/cargo-audit\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14363-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["0.10.3~git0.ee7d7ef-2.1"],"introduced":["0"],"last_affected":[],"package":"cargo-c","purl":"pkg:rpm/opensuse/cargo-c\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14359-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.3.6-5.1"],"introduced":["0"],"last_affected":[],"package":"obs-service-cargo","purl":"pkg:rpm/opensuse/obs-service-cargo\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14364-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.22.0-1.1"],"introduced":["0"],"last_affected":[],"package":"onefetch","purl":"pkg:rpm/opensuse/onefetch\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14353-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.4.12-1.1"],"introduced":["0"],"last_affected":[],"package":"stgit","purl":"pkg:rpm/opensuse/stgit\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14355-1"}],"prev":{"headline":"OpenCTI's lack of Rate Limit lead to OTP brute forcing","id":"CVE-2024-45404"},"products":["gitoxide"],"published":"2024-09-06","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":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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-09-06","vendors":["Byron"]},"summary":"A local attacker can inject configuration leading to code execution by exploiting improper path resolution in gix-path when Git reports quoted paths.","url":"https://insights.sbomify.com/CVE-2024-45405/"}