Skip to content
OpenAdvisories
Low · 2.1 CVE-2024-50349 EUVD-2024-44589

Git does not sanitize URLs when asking for credentials interactively

Published Jan 14, 2025 · Updated Nov 3, 2025 · Assigned by GitHub_M

Description

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 Git asks for credentials via a terminal prompt (i.e. without using any credential helper), it prints out the host name for which the user is expected to provide a username and/or a password. At this stage, any URL-encoded parts have been decoded already, and are printed verbatim. This allows attackers to craft URLs that contain ANSI escape sequences that the terminal interpret to confuse users e.g. into providing passwords for trusted Git hosting sites when in fact they are then sent to untrusted sites that are under the attacker's control. This issue has been patch via commits `7725b81` and `c903985` which are included in release versions v2.48.1, v2.47.2, v2.46.3, v2.45.3, v2.44.3, v2.43.6, v2.42.4, v2.41.3, and v2.40.4. Users are advised to upgrade. Users unable to upgrade should avoid cloning from untrusted URLs, especially recursive clones.

Affected products

VendorProductAffectedFixed
git git <= 2.40.3, >= 2.41.0, <= 2.41.2, >= 2.42.0, <= 2.42.3, >= 2.43.0, <= 2.43.5, >= 2.44.0, <= 2.44.2, >= 2.45.0, <= 2.45.2, >= 2.46.0, <= 2.46.2, >= 2.47.0, < 2.47.2, = 2.48.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 git 1:2.47.2-0.1 —
Debian 13 git 1:2.47.2-0.1 —
Debian 12 git 1:2.39.5-0+deb12u2 DSA-5850-1
Debian 11 git 1:2.30.2-1+deb11u4 DLA-4031-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS git 1:2.43.0-1ubuntu7.2 USN-7207-1
Ubuntu 22.04 LTS git 1:2.34.1-1ubuntu1.12 USN-7207-1
Ubuntu 20.04 LTS git 1:2.25.1-1ubuntu3.14 USN-7207-2
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS git 1:2.17.1-1ubuntu0.18+esm6 —
Ubuntu Pro 16.04 LTS git 1:2.7.4-0ubuntu1.10+esm13 —
ReleasePackageFixed inAdvisory
RHEL 10 git +14 2.47.3-1.el10_0 RHSA-2025:11533
RHEL 9 git +14 2.47.3-1.el9_6 RHSA-2025:11462
RHEL 8 git +14 2.43.7-1.el8_10 RHSA-2025:11534
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.4 EUS git +14 2.43.5-1.el9_4.3 RHSA-2025:19601

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 10 gitk +10 2.47.3-1.el10_0 ALSA-2025:11533
AlmaLinux 9 git +14 2.47.3-1.el9_6 ALSA-2025:11462
AlmaLinux 8 git +14 2.43.7-1.el8_10 ALSA-2025:11534

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 git 2.47.3-1.el9_6 RLSA-2025:11462
Rocky Linux 8 git 2.43.7-1.el8_10 RLSA-2025:11534
ReleasePackageFixed inAdvisory
SLES 15 SP6 git 2.43.0-150600.3.9.1 SUSE-SU-2025:0116-1
SLES 15 SP5 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLES 15 SP4 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLES 15 SP3 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLES 12 SP5 git 2.26.2-27.78.1 SUSE-SU-2025:0197-1
Show 12 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP5 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLES for SAP 15 SP4 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLES for SAP 15 SP3 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLE Micro 6.1 git 2.46.0-slfo.1.1_2.1 SUSE-RU-2025:20362-1
SLE Micro 6.0 git 2.45.1-2.1 SUSE-SU-2025:20721-1, SUSE-SU-2025:20197-1
SLE Micro 5.5 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLE HPC 15 SP5 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLE HPC 15 SP4 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SLE HPC 15 SP3 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SUSE Manager Server 4.3 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SUSE Manager Proxy 4.3 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
SUSE Enterprise Storage 7.1 git 2.35.3-150300.10.48.1 SUSE-SU-2025:0144-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed git 2.48.1-1.1 openSUSE-SU-2025:14652-1
openSUSE Leap 15.6 git 2.43.0-150600.3.9.1 SUSE-SU-2025:0116-1
ReleasePackageFixed inAdvisory
Alpine v3.24 git 2.48.1-r0 —
Alpine v3.23 git 2.48.1-r0 —
Alpine v3.22 git 2.48.1-r0 —
Alpine v3.21 git 2.47.2-r0 —
Alpine v3.20 git 2.45.3-r0 —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 git 2.43.6-r0 —
Alpine v3.18 git 2.40.4-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 git +16 2.47.1-1.amzn2023.0.2 ALAS2023-2025-815
Amazon Linux 2 git +16 2.47.1-1.amzn2.0.2 ALAS2-2025-2737

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 git 2.45.3-1 —
Azure Linux 2 (CBL-Mariner) git 2.40.4-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 10 git +14 2.47.3-1.el10_0 ELSA-2025-11533
Oracle Linux 9 git +14 2.47.3-1.el9_6 ELSA-2025-11462
Oracle Linux 8 git +14 2.43.7-1.el8_10 ELSA-2025-11534

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling git 2.48.1-r0 —

Advisories 27

References