VDB

CVE-2024-50349

CVE-2024-50349 PUBLISHED CVSS 2.1 LOW

Git does not sanitize URLs when asking for credentials interactively

Reported by github_m · Published January 14, 2025

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
gitwebAmazon Linux2.47.1-1.amzn2023.0.2

Risk scores

CVSS 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

Affected products

VendorProductVersions
gitgit<= 2.40.3, >= 2.41.0, <= 2.41.2, >= 2.42.0, <= 2.42.3
amazon:2023gitweb0
gitgit2.48.0, 2.47.0, 2.46.0
amazon:2git-instaweb0
amazon:2gitweb0
wolfigit0
amazon:2git-all0
amazon:2023git-gui0
chainguardgit0
amazon:2git-subtree0
amazon:2git-svn0
amazon:2023git-core0
amazon:2023git-all0
amazon:2git-email0
amazon:2023git-p40
amazon:2023git-instaweb0
amazon:2gitk0
amazon:2git0
amazon:2git-gui0
amazon:2023perl-Git-SVN0

…and 19 more

Timeline

  • Jan 14, 2025 CVE Published
  • Jan 15, 2025 EPSS Score (30 in total, the first dated here)
  • Jan 21, 2025 Coalition ESS Score (15 in total, the first dated here)
  • Dec 20, 2025 CVE Updated
  • Jan 2, 2026 Security Advisory (14 in total, the first dated here)
  • Apr 18, 2026 PoC Published
  • Oct 23, 2026 Distribution Patch (9 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-50349
vulnetix vdb fixes CVE-2024-50349

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-50349/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›