CVE Database›Document archive›CVE-2020-11008

CVE-2020-11008

git: Crafted URL containing new lines, empty host or lacks a scheme can cause credential leak

Loading…

Severity

Important

Red Hat Product Security

7.5

CVSS 3.1

Review impact separately from score.

Published · April 21, 2020

Updated · June 28, 2026

Description

A flaw was found in git where credentials can be leaked through the use of a crafted URL. The crafted URL must contain a newline, empty host, or lack a scheme so that the credential helper is fulled into giving the information of a different host to the client. The highest threat from this vulnerability is to data confidentiality.

Statement

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 made available for this product.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

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 or git fetch for the presence of encoded newlines (%0A) or syntactic oddities (e.g., http:///host with three slashes).
  2. Avoid using submodules with untrusted repositories (don't use git 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.
  4. Avoid using the credential helper by only cloning publicly available repositories.

CVSS / CWE

CVSS 3.1 · 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CWE-20 · Improper Input Validation