Описание
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.
A line-end handling flaw was found in Git. When writing a config entry, values with a trailing carriage return (CR) are not quoted, resulting in the CR being lost when the config is read later. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read, resulting in the submodule being checked out to an incorrect location.
Отчет
This vulnerability marked as Important and not Moderate flaw because it undermines Git’s path and config integrity by allowing carriage return (\r) injection to manipulate submodule checkout behavior. Git previously failed to quote config values containing trailing CR, causing the value to be misinterpreted when read back. In the context of submodules, this leads to incorrect path resolution, allowing an attacker to redirect the checkout path via a symlink to a sensitive directory like .git/modules//hooks. If an executable post-checkout hook exists there, it could be inadvertently executed, resulting in arbitrary code execution during submodule operations. This is particularly dangerous in automated CI/CD pipelines or multi-repo projects where submodules are initialized or updated without manual inspection.
Меры по смягчению последствий
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Затронутые пакеты
Платформа | Пакет | Состояние | Рекомендация | Релиз |
---|---|---|---|---|
Red Hat Enterprise Linux 6 | git | Will not fix | ||
Red Hat OpenShift Container Platform 4 | rhcos | Affected | ||
Red Hat OpenShift Dev Spaces | devspaces/code-rhel9 | Affected | ||
Red Hat Enterprise Linux 10 | git | Fixed | RHSA-2025:11533 | 22.07.2025 |
Red Hat Enterprise Linux 7 Extended Lifecycle Support | git | Fixed | RHSA-2025:11688 | 24.07.2025 |
Red Hat Enterprise Linux 8 | git | Fixed | RHSA-2025:11534 | 23.07.2025 |
Red Hat Enterprise Linux 8.2 Advanced Update Support | git | Fixed | RHSA-2025:11793 | 24.07.2025 |
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | git | Fixed | RHSA-2025:11800 | 28.07.2025 |
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | git | Fixed | RHSA-2025:11800 | 28.07.2025 |
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | git | Fixed | RHSA-2025:11801 | 28.07.2025 |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
8 High
CVSS3
Связанные уязвимости
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.
Git is a fast, scalable, distributed revision control system with an u ...
Уязвимость распределенной системы контроля версий Git средства разработки программного обеспечения Microsoft Visual Studio, позволяющая нарушителю выполнить произвольный код
8 High
CVSS3