Skip to content
Fencer Vulns
medium 4.7

CVE-2024-50349 json

Git does not sanitize URLs when asking for credentials interactively

published 2025-01-14 21 mo ago modified 2026-09-10 59 d ago also BIT-git-2024-50349 , EUVD-2024-44589 , GHSA-hmg8-h7qf-7cxr

cvss
4.7
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.7%
EPSS 0.7% chance of exploitation in 30 days, percentile 51%
public exploits
0
none known

Summary

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.

Patch / fix

  • bitnami git 2.40.4, 2.41.3, 2.42.4, 2.43.6, 2.44.3, 2.45.3, 2.46.3, 2.47.2, 2.48.1
  • git-scm git 2.40.4, 2.41.3, 2.42.4, 2.43.6, 2.44.3, 2.45.3, 2.46.3, 2.47.2, 2.48.1
  • git git 2.40.4, 2.41.3, 2.42.4, 2.43.6, 2.44.3, 2.45.3, 2.46.3, 2.47.2, 2.48.1
  • git_project git 2.40.4, 2.41.3, 2.42.4, 2.43.6, 2.44.3, 2.45.3, 2.46.3, 2.47.2, 2.48.1
  • git Debian 12 1:2.39.5-0+deb12u2
  • git Debian 14, Debian 13 1:2.47.2-0.1

debian advisories DEBIAN-CVE-2024-50349

  • git Ubuntu 20.04 LTS 1:2.25.1-1ubuntu3.14
  • git Ubuntu 22.04 LTS 1:2.34.1-1ubuntu1.12
  • git Ubuntu 24.04 LTS 1:2.43.0-1ubuntu7.2
  • git Ubuntu Pro 16.04 LTS 1:2.7.4-0ubuntu1.10+esm13
  • git Ubuntu Pro 18.04 LTS 1:2.17.1-1ubuntu0.18+esm6

ubuntu advisories UBUNTU-CVE-2024-50349

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • git RHEL 8 2.43.7-1.el8_10
  • gitk RHEL 8 2.43.7-1.el8_10
  • gitweb RHEL 8 2.43.7-1.el8_10
  • git-all RHEL 8 2.43.7-1.el8_10
  • git-gui RHEL 8 2.43.7-1.el8_10
  • git-svn RHEL 8 2.43.7-1.el8_10
  • git-core RHEL 8 2.43.7-1.el8_10
  • perl-Git RHEL 8 2.43.7-1.el8_10

red hat advisories RHSA-2025:19601RHSA-2025:11534RHSA-2025:11533RHSA-2025:11462

  • git Linux Micro 6.0 2.51.0-1.1
  • git Linux Micro 6.1 2.46.0-slfo.1.1_2.1
  • git Linux Micro 6.0 2.45.1-2.1
  • git SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES for SAP 15 SP3 +12 more 2.35.3-150300.10.48.1
  • git SLE Module for Development Tools 15 SP6, SLE Module for Basesystem 15 SP6, openSUSE Leap 15.6 2.43.0-150600.3.9.1
  • git SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 2.26.2-27.78.1

suse advisories SUSE-SU-2025:20721-1SUSE-RU-2025:20362-1SUSE-SU-2025:20197-1SUSE-SU-2025:0197-1SUSE-SU-2025:0144-1SUSE-SU-2025:0116-1

  • git openSUSE Tumbleweed 2.48.1-1.1

opensuse advisories openSUSE-SU-2025:14652-1

  • gitk AlmaLinux 10 2.47.3-1.el10_0
  • gitweb AlmaLinux 10 2.47.3-1.el10_0
  • git-all AlmaLinux 10 2.47.3-1.el10_0
  • git-gui AlmaLinux 10 2.47.3-1.el10_0
  • git-svn AlmaLinux 10 2.47.3-1.el10_0
  • perl-Git AlmaLinux 10 2.47.3-1.el10_0
  • git-email AlmaLinux 10 2.47.3-1.el10_0
  • git-subtree AlmaLinux 10 2.47.3-1.el10_0

almalinux advisories ALSA-2025:11533ALSA-2025:11534ALSA-2025:11462

  • git Rocky Linux 9 2.47.3-1.el9_6
  • git Rocky Linux 8 2.43.7-1.el8_10

rocky linux advisories RLSA-2025:11462RLSA-2025:11534

  • git Alpine 3.18 2.40.4-r0
  • git Alpine 3.19 2.43.6-r0
  • git Alpine 3.20 2.45.3-r0
  • git Alpine 3.21 2.47.2-r0
  • git Alpine 3.24, Alpine 3.23, Alpine 3.22 2.48.1-r0

alpine advisories ALPINE-CVE-2024-50349

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • git CBL-Mariner 2.0 2.40.4-1
  • git Azure Linux 3.0 2.45.3-1

azure linux advisories AZL-55640AZL-55689

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-50349 updated cvss 3.1

git: Git does not sanitize URLs when asking for credentials interactively

  • Red Hat Enterprise Linux 6 git, gitk, gitweb, git-all, git-cvs, git-gui, +6 more Red Hat Enterprise Linux 7 git, gitk, git-hg, git-p4, gitweb, git-all, +12 more
    affected: no fix available “Fix deferred”
  • Red Hat Fuse 7 io.syndesis-syndesis-parent io.syndesis-syndesis-parent
    affected: no fix planned “Out of support scope”
  • Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    affected: no fix available “Fix deferred”
  • Red Hat Enterprise Linux AppStream (v. 8) git 2.43.7-1.el8_10, gitk 2.43.7-1.el8_10, gitweb 2.43.7-1.el8_10, git-all 2.43.7-1.el8_10, git-gui 2.43.7-1.el8_10, git-svn 2.43.7-1.el8_10, +8 more
    fixed: vendor fix RHSA-2025:11534
  • Red Hat Enterprise Linux AppStream (v. 9) git 2.47.3-1.el9_6, gitk 2.47.3-1.el9_6, gitweb 2.47.3-1.el9_6, git-all 2.47.3-1.el9_6, git-gui 2.47.3-1.el9_6, git-svn 2.47.3-1.el9_6, +8 more
    fixed: vendor fix RHSA-2025:11462
  • Red Hat Enterprise Linux AppStream (v. 10) git 2.47.3-1.el10_0, gitk 2.47.3-1.el10_0, gitweb 2.47.3-1.el10_0, git-all 2.47.3-1.el10_0, git-gui 2.47.3-1.el10_0, git-svn 2.47.3-1.el10_0, +8 more
    fixed: vendor fix RHSA-2025:11533
  • Red Hat Enterprise Linux AppStream EUS (v.9.4) git 2.43.5-1.el9_4.3, gitk 2.43.5-1.el9_4.3, gitweb 2.43.5-1.el9_4.3, git-all 2.43.5-1.el9_4.3, git-gui 2.43.5-1.el9_4.3, git-svn 2.43.5-1.el9_4.3, +8 more
    fixed: vendor fix RHSA-2025:19601

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
21 mo ago

Exploit prediction

0.65% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 4.0 2.1 CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
CNA 4.0 2.1 CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
NVD 3.1 4.7 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
OSV 3.1 4.7 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N

Affected packages

ecosystem package affected fixed in
bitnami git
<2.40.4
>=2.41.0, <2.41.3
>=2.42.0, <2.42.4
>=2.43.0, <2.43.6
>=2.44.0, <2.44.3
>=2.45.0, <2.45.3
>=2.46.0, <2.46.3
>=2.47.0, <2.47.2
>=2.48.0, <2.48.1
2.40.4
2.41.3
2.42.4
2.43.6
2.44.3
2.45.3
2.46.3
2.47.2
2.48.1

Affected products

  • git git

Classification

Weakness
  • CWE-116 Improper Encoding or Escaping of Output
  • CWE-147 Improper Neutralization of Input Terminators
  • CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.