CVE-2024-50349
Git does not sanitize URLs when asking for credentials interactively
- Published
- Updated
- Reserved
- 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.
Timeline
ID reserved
By GitHub_M
- 3 months later
· 3 months later
Published
- 10 months later
· 10 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 4.0 | Low2.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 |
| NVDNVD · Analyzed | 4.0 | Low2.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 |
- EPSS (exploitation in 30 days)
- 0.65% · top 48% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Low 2.1.
Weakness
- CWE-116: Improper Encoding or Escaping of Output (opens in a new tab)All about CWE-116 and its CVEs
- CWE-147: Improper Neutralization of Input Terminators (opens in a new tab)All about CWE-147 and its CVEs
- CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences (opens in a new tab)All about CWE-150 and its CVEs
Affected products
References (4)
- https://github.com/git/git/security/advisories/GHSA-hmg8-h7qf-7cxr (opens in a new tab)x_refsource_CONFIRM
- https://github.com/git/git/commit/7725b8100ffbbff2750ee4d61a0fcc1f53a086e8 (opens in a new tab)x_refsource_MISC
- https://github.com/git/git/commit/c903985bf7e772e2d08275c1a95c8a55ab011577 (opens in a new tab)x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2025/01/msg00025.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2024-50349)Record last updated .