CVE-2024-45405
CVE-2024-45405 · gix-path improperly resolves configuration path reported by Git
CVSS 6.0 · Media · EPSS 0,3% · Corrección disponible
Compara con tu versión instalada
Los productos afectados y las versiones corregidas conocidas son datos públicos. Compáralos con tu versión instalada.
- gitoxideSin corrección publicada
- rust-gix-path Debian 13Actualiza a 0.10.11-1
- rust-gix-path Debian 14Actualiza a 0.10.11-1
- rust-gix-path Ubuntu 24.04 LTSSin corrección publicada
Comprueba la versión instalada:
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="rust-gix-path"'Evalúa los riesgos de tu servidor
La comprobación gratuita te da una puntuación y un resumen de riesgos por pila tecnológica, sin registro. No indica si esta vulnerabilidad concreta te afecta.
La monitorización compara los datos públicos con el software de tus servidores. Ofrece hallazgos detallados y el orden de las actualizaciones.
curl -fsSL https://patchfirst.dev/check.sh | shLos canales publican noticias generales sobre tecnologías; la monitorización te avisa de nuevos hallazgos en tus servidores en el panel, mediante notificaciones del navegador, en Telegram o por webhook.
Esta página presenta datos de fuentes públicas de vulnerabilidades. Consulta el aviso original antes de actualizar.
`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.
In `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.
On 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.
- Publicación
- Actualización
Correcciones en distribuciones
- SUSE-SU-2024:3748-1 · openSUSE Leap 15.6 ·
- openSUSE-SU-2024:14363-1 · openSUSE Tumbleweed ·
- openSUSE-SU-2024:14364-1 · openSUSE Tumbleweed ·
- openSUSE-SU-2024:14359-1 · openSUSE Tumbleweed ·
- openSUSE-SU-2024:14353-1 · openSUSE Tumbleweed ·
- openSUSE-SU-2024:14355-1 · openSUSE Tumbleweed ·
Pila tecnológica: system
Productos y versiones afectados
gitoxide
- Versiones
- < 0.10.11: Afectada
Sin corrección publicada
rust-gix-path Debian 13
- Intervalos de versiones afectados
- ECOSYSTEM: < 0.10.11-1
Actualiza a 0.10.11-1
rust-gix-path Debian 14
- Intervalos de versiones afectados
- ECOSYSTEM: < 0.10.11-1
Actualiza a 0.10.11-1
rust-gix-path Ubuntu 24.04 LTS
- Versiones
- 0.10.0-1
- 0.10.4-1
- Intervalos de versiones afectados
- ECOSYSTEM: (−∞, +∞)
Sin corrección publicada
Fuentes originales
- https://github.com/Byron/gitoxide/security/advisories/GHSA-m8rp-vv92-46c7
- https://github.com/Byron/gitoxide/commit/650a1b5cf25e086197cc55a68525a411e1c28031
- https://github.com/Byron/gitoxide/blob/1cfe577d461293879e91538dbc4bbfe01722e1e8/gix-path/src/env/git/mod.rs#L138-L142
- https://nvd.nist.gov/vuln/detail/CVE-2024-45405