# CVE-2024-50349: Git does not sanitize URLs when asking for credentials interactively

- Severity: Low 2.1 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.65%, higher than 52% of CVEs (2026-12-01)
- Published: 2025-01-14T18:43:42.620Z
- Modified: 2026-09-10T16:01:31.922Z
- Also known as: BIT-GIT-2024-50349, GHSA-hmg8-h7qf-7cxr
- Weaknesses: CWE-116, CWE-147, CWE-150
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- 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; before 2.40.4; from 2.41.0 before 2.41.3; from 2.42.0 before 2.42.4; and 6 more
- debian debian_linux: 11.0
- git (Bitnami): before 2.40.4; from 2.41.0 before 2.41.3; from 2.42.0 before 2.42.4; from 2.43.0 before 2.43.6; from 2.44.0 before 2.44.3; from 2.45.0 before 2.45.3; from 2.46.0 before 2.46.3; from 2.47.0 before 2.47.2; from 2.48.0 before 2.48.1

## Every score

- GitHub_M: CVSS:4.0 2.1 Low `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`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/git/git/security/advisories/GHSA-hmg8-h7qf-7cxr> (advisory, patch, vendor-advisory)
- <https://github.com/git/git/commit/7725b8100ffbbff2750ee4d61a0fcc1f53a086e8> (fix, patch)
- <https://github.com/git/git/commit/c903985bf7e772e2d08275c1a95c8a55ab011577> (fix, patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00025.html> (advisory, mailing-list, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-50349> (web)

## Sources

- CVE List: [CVE-2024-50349](https://www.cve.org/CVERecord?id=CVE-2024-50349), CVE Terms of Use, modified 2025-11-03
- NVD: [CVE-2024-50349](https://nvd.nist.gov/vuln/detail/CVE-2024-50349), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GIT-2024-50349](https://osv.dev/vulnerability/BIT-GIT-2024-50349), Apache-2.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2024-50349 · Whole record: https://cve.day/CVE-2024-50349.json · Rebuilt by cve.day 2026-11-25T22:58:51.026Z
