Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2020-5260

Опубликовано: 14 апр. 2020
Источник: redhat
CVSS3: 7.5
EPSS Средний

Описание

Affected versions of Git have a vulnerability whereby Git can be tricked into sending private credentials to a host controlled by an attacker. Git uses external "credential helper" programs to store and retrieve passwords or other credentials from secure storage provided by the operating system. Specially-crafted URLs that contain an encoded newline can inject unintended values into the credential helper protocol stream, causing the credential helper to retrieve the password for one server (e.g., good.example.com) for an HTTP request being made to another server (e.g., evil.example.com), resulting in credentials for the former being sent to the latter. There are no restrictions on the relationship between the two, meaning that an attacker can craft a URL that will present stored credentials for any host to a host of their choosing. The vulnerability can be triggered by feeding a malicious URL to git clone. However, the affected URLs look rather suspicious; the likely vector would be through systems which automatically clone URLs not visible to the user, such as Git submodules, or package systems built around Git. The problem has been patched in the versions published on April 14th, 2020, going back to v2.17.x. Anyone wishing to backport the change further can do so by applying commit 9a6bbee (the full release includes extra checks for git fsck, but that commit is sufficient to protect clients against the vulnerability). The patched versions are: 2.17.4, 2.18.3, 2.19.4, 2.20.3, 2.21.2, 2.22.3, 2.23.2, 2.24.2, 2.25.3, 2.26.1.

A flaw was found in git. Credentials can be leaked through the use of a crafted URL that contains a newline, fooling the credential helper to give information for a different host. Highest threat from the vulnerability is to data confidentiality.

Отчет

Red Hat Enterprise Linux 6 is not affected by this flaw as the vulnerable version of git, version 1.7.9-rc0 and later, was never packaged for this instance of RHEL.

Меры по смягчению последствий

The most complete workaround is to disable credential helpers altogether:

git config --unset credential.helper git config --global --unset credential.helper git config --system --unset credential.helper

An alternative is to avoid malicious URLs:

  1. Examine the hostname and username portion of URLs fed to git clone for the presence of encoded newlines (%0a) or evidence of credential-protocol injections (e.g., host=github.com)
  2. Avoid using submodules with untrusted repositories (don't use clone --recurse-submodules; use git submodule update only after examining the URLs found in .gitmodules)
  3. Avoid tools which may run git clone on untrusted URLs under the hood

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 6gitNot affected
Red Hat Enterprise Linux 7gitFixedRHSA-2020:151121.04.2020
Red Hat Enterprise Linux 7.7 Extended Update SupportgitFixedRHSA-2020:358131.08.2020
Red Hat Enterprise Linux 8gitFixedRHSA-2020:151321.04.2020
Red Hat Enterprise Linux 8.0 Update Services for SAP SolutionsgitFixedRHSA-2020:151821.04.2020
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-git218-gitFixedRHSA-2020:150321.04.2020
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSrh-git218-gitFixedRHSA-2020:150321.04.2020
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSrh-git218-gitFixedRHSA-2020:150321.04.2020
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-git218-gitFixedRHSA-2020:150321.04.2020

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-20
https://bugzilla.redhat.com/show_bug.cgi?id=1822020git: Crafted URL containing new lines can cause credential leak

EPSS

Процентиль: 97%
0.3681
Средний

7.5 High

CVSS3

Связанные уязвимости

CVSS3: 9.3
ubuntu
почти 6 лет назад

Affected versions of Git have a vulnerability whereby Git can be tricked into sending private credentials to a host controlled by an attacker. Git uses external "credential helper" programs to store and retrieve passwords or other credentials from secure storage provided by the operating system. Specially-crafted URLs that contain an encoded newline can inject unintended values into the credential helper protocol stream, causing the credential helper to retrieve the password for one server (e.g., good.example.com) for an HTTP request being made to another server (e.g., evil.example.com), resulting in credentials for the former being sent to the latter. There are no restrictions on the relationship between the two, meaning that an attacker can craft a URL that will present stored credentials for any host to a host of their choosing. The vulnerability can be triggered by feeding a malicious URL to git clone. However, the affected URLs look rather suspicious; the likely vector would be...

CVSS3: 9.3
nvd
почти 6 лет назад

Affected versions of Git have a vulnerability whereby Git can be tricked into sending private credentials to a host controlled by an attacker. Git uses external "credential helper" programs to store and retrieve passwords or other credentials from secure storage provided by the operating system. Specially-crafted URLs that contain an encoded newline can inject unintended values into the credential helper protocol stream, causing the credential helper to retrieve the password for one server (e.g., good.example.com) for an HTTP request being made to another server (e.g., evil.example.com), resulting in credentials for the former being sent to the latter. There are no restrictions on the relationship between the two, meaning that an attacker can craft a URL that will present stored credentials for any host to a host of their choosing. The vulnerability can be triggered by feeding a malicious URL to git clone. However, the affected URLs look rather suspicious; the likely vector would be th

CVSS3: 9.3
debian
почти 6 лет назад

Affected versions of Git have a vulnerability whereby Git can be trick ...

suse-cvrf
почти 6 лет назад

Security update for git

suse-cvrf
почти 6 лет назад

Security update for git

EPSS

Процентиль: 97%
0.3681
Средний

7.5 High

CVSS3

Уязвимость CVE-2020-5260