cve.bz

CVE-2020-5260 Insufficiently Protected Credentials

7.5 highEPSS 15%Fix available

High (7.5). EPSS 15% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
15% (unchanged from 15% a week ago; 10.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-522 Insufficiently Protected Credentials
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection, A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2020-5260 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2020-5260?via=ask-ai-copy and https://cve.bz/cve/CVE-2020-5260?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2020-5260 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
git:gitbefore 2.17.4
git:gitfrom 2.22.0 before 2.22.3
git-scm:gitfrom 2.18.0 before 2.18.3
git-scm:gitfrom 2.19.0 before 2.19.4
git-scm:gitfrom 2.20.0 before 2.20.3
git-scm:gitfrom 2.21.0 before 2.21.2
git-scm:gitfrom 2.23.0 before 2.23.2
git-scm:gitfrom 2.24.0 before 2.24.2
git-scm:gitfrom 2.25.0 before 2.25.3
git-scm:gitfrom 2.26.0 before 2.26.1
canonical:ubuntu_linux16.04
canonical:ubuntu_linux18.04
canonical:ubuntu_linux19.10
debian:debian_linux8.0
debian:debian_linux9.0
debian:debian_linux10.0
fedoraproject:fedora30
fedoraproject:fedora31
fedoraproject:fedora32
opensuse:leap15.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8git1:2.1.4-2.1+deb8u9DLA-2177-1
Debian9git1:2.11.0-3+deb9u6DSA-4657-1
Debian10git1:2.20.1-2+deb10u2DSA-4657-1
Debian12, 13, 14git1:2.26.1-1DEBIAN-CVE-2020-5260
Ubuntu16.04:LTSgit1:2.7.4-0ubuntu1.8UBUNTU-CVE-2020-5260 USN-4329-1
Ubuntu18.04:LTSgit1:2.17.1-1ubuntu0.6UBUNTU-CVE-2020-5260 USN-4329-1
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 moregit, gitk, git-hg and 16 more0:1.8.3.1-22.el7_8RHSA-2020:1511
Red Hatenterprise_linux:8::appstreamgit, gitk, gitweb and 16 more0:2.18.2-2.el8_1RHSA-2020:1513
Red Hatrhel_e4s:8.0::appstreamgit, gitk, gitweb and 16 more0:2.18.2-2.el8_0RHSA-2020:1518
Red Hatrhel_eus:7.7::computenode, rhel_eus:7.7::servergit, gitk, git-hg and 16 more0:1.8.3.1-23.el7_7RHSA-2020:3581
Red Hatrhel_software_collections:3::el7rh-git218-git, rh-git218-gitk, rh-git218-git-p4 and 14 more0:2.18.2-3.el7RHSA-2020:1503
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP1-LTSS and 16 moregit2.26.0-27.27.1SUSE-SU-2020:0992-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP1-LTSS and 16 moregit2.26.2-27.36.1SUSE-SU-2020:1295-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP1-LTSS and 16 morepcre210.34-1.3.1SUSE-SU-2020:0992-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP1-LTSS and 14 moreperl-CGI4.38-1.3.1SUSE-SU-2020:0992-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Module for Basesystem 15 SP1 and 3 moregit2.16.4-3.20.1SUSE-SU-2020:0991-1
SUSELinux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Development Tools 15 SP1git2.26.1-3.25.2SUSE-SU-2020:1121-1
openSUSELeap 15.1git2.16.4-lp151.4.6.1openSUSE-SU-2020:0524-1
openSUSELeap 15.1git2.26.1-lp151.4.9.1openSUSE-SU-2020:0598-1
openSUSETumbleweedgit2.33.0-1.3openSUSE-SU-2024:10786-1
Alpinev3.8git2.18.3-r0ALPINE-CVE-2020-5260
Alpinev3.9git2.20.3-r0ALPINE-CVE-2020-5260
Alpinev3.10git2.22.3-r0ALPINE-CVE-2020-5260
Alpinev3.11git2.24.2-r0ALPINE-CVE-2020-5260
Alpinev3.12, v3.13, v3.14 and 10 moregit2.26.1-r0ALPINE-CVE-2020-5260

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's 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 packaged for this instance of RHEL.

Red Hat's 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 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

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7git-0:1.8.3.1-22.el7_8Fixed 2020-04-21RHSA-2020:1511
Red Hat Enterprise Linux 7.7 Extended Update Supportgit-0:1.8.3.1-23.el7_7Fixed 2020-08-31RHSA-2020:3581
Red Hat Enterprise Linux 8git-0:2.18.2-2.el8_1Fixed 2020-04-21RHSA-2020:1513
Red Hat Enterprise Linux 8.0 Update Services for SAP Solutionsgit-0:2.18.2-2.el8_0Fixed 2020-04-21RHSA-2020:1518
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-git218-git-0:2.18.2-3.el7Fixed 2020-04-21RHSA-2020:1503
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSrh-git218-git-0:2.18.2-3.el7Fixed 2020-04-21RHSA-2020:1503
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSrh-git218-git-0:2.18.2-3.el7Fixed 2020-04-21RHSA-2020:1503
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUSrh-git218-git-0:2.18.2-3.el7Fixed 2020-04-21RHSA-2020:1503
Red Hat Enterprise Linux 6gitNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2020-5260.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-522 (13), CWE-20 (51).

References

Check your stackJSON