CVE-2024-50349
JSON

2.1low

Git does not sanitize URLs when asking for credentials interactively

Severity
2.1low CVSS:4.0 by GitHub_M
Exploit likelihood
0.65% (higher than 52% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
BIT-GIT-2024-50349GHSA-hmg8-h7qf-7cxr

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

Product or packageVersionsReported by
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 and 10 moreCVE List, NVD
debian debian_linux11.0NVD
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 and 1 moreBitnami Vulnerability Database

All scores

GitHub_M2.1low CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
NVD4.7medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
Bitnami Vulnerability Databasemedium rating

Classification

CWE-116CWE-147CWE-150

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Git es un sistema de control de revisión distribuido, rápido y escalable con un conjunto de comandos inusualmente rico que proporciona operaciones de alto nivel y acceso completo a los elementos internos. Cuando Git solicita credenciales a través de un indicador de terminal (es decir, sin usar ningún asistente de credenciales), imprime el nombre de host para el que se espera que el usuario proporcione un nombre de usuario y/o una contraseña. En esta etapa, todas las partes codificadas en URL ya han sido decodificadas y se imprimen textualmente. Esto permite a los atacantes crear URL que contienen secuencias de escape ANSI que la terminal interpreta para confundir a los usuarios, por ejemplo, para que proporcionen contraseñas para sitios de alojamiento de Git confiables cuando, de hecho, luego se envían a sitios que no son de confianza y que están bajo el control del atacante. Este problema se ha corregido mediante las confirmaciones `7725b81` y `c903985`, que están incluidas en las versiones de lanzamiento v2.48.1, v2.47.1, v2.46.3, v2.45.3, v2.44.3, v2.43.6, v2.42.4, v2.41.3 y v2.40.4. Se recomienda a los usuarios que actualicen la versión. Los usuarios que no puedan actualizar deben evitar la clonación desde URL que no sean de confianza, especialmente clones recursivos.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-50349 changed 2025-11-03CVE Terms of Use
NVDCVE-2024-50349 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-GIT-2024-50349 changed 2026-09-10Apache-2.0