CVE-2020-5260
malicious URLs may cause Git to present stored credentials to the wrong server
Reported by github_m · Published April 14, 2020
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| gitweb | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| perl-Git-SVN | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-instaweb | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-email | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-p4 | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-gui | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| gitk | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-svn | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-subtree | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-all | Amazon Linux | 2.23.1-1.amzn2.0.2 |
| git-cvs | Amazon Linux | 2.23.1-1.amzn2.0.2 |
12 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| git | git | < 2.17.4, >= 2.18.0, < 2.18.3, >= 2.19.0, 2.19.4 |
| amazon:2 | gitweb | 0 |
| amazon:2 | perl-Git-SVN | 0 |
| amazon:2 | git-instaweb | 0 |
| amazon:2 | git-email | 0 |
| amazon:2 | git-p4 | 0 |
| amazon:2 | git-gui | 0 |
| amazon:2 | git | 0 |
| amazon:2 | gitk | 0 |
| amazon:2 | git-svn | 0 |
| amazon:2 | git-subtree | 0 |
| amazon:2 | git-all | 0 |
| amazon:2 | git-cvs | 0 |
| amazon:2 | git-daemon | 0 |
| arch | git | 0 |
| amazon:2 | git-core-doc | 0 |
| amazon:2 | git-core | 0 |
| alpine | git | 0, 0, 0 |
| amazon:2 | perl-Git | 0 |
| git | git | 0, 2.18.0, 2.20.0 |
Timeline
- Apr 14, 2020 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Sep 8, 2025 CVE Updated
- Mar 6, 2026 Distribution Patch (9 in total, the first dated here)
- Mar 6, 2026 Security Advisory (14 in total, the first dated here)
- Apr 18, 2026 PoC Published
- Aug 30, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2020-5260
vulnetix vdb fixes CVE-2020-5260
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2020-5260/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_MISC
- DSA-4657 vendor-advisoryx_refsource_DEBIAN
- [debian-lts-announce] 20200415 [SECURITY] [DLA 2177-1] git security update mailing-listx_refsource_MLIST
- [oss-security] 20200415 CVE-2020-5260: Git: malicious URLs may cause Git to present stored credentials to the wrong server mailing-listx_refsource_MLIST
- x_refsource_MISC
- [oss-security] 20200415 Re: CVE-2020-5260: Git: malicious URLs may cause Git to present stored credentials to the wrong server mailing-listx_refsource_MLIST
- openSUSE-SU-2020:0524 vendor-advisoryx_refsource_SUSE
- x_refsource_CONFIRM
- FEDORA-2020-cdef88bb89 vendor-advisoryx_refsource_FEDORA
- [oss-security] 20200420 CVE-2020-11008: Git: Malicious URLs can still cause Git to send a stored credential to the wrong server mailing-listx_refsource_MLIST
- GLSA-202004-13 vendor-advisoryx_refsource_GENTOO
- FEDORA-2020-c6548b488f vendor-advisoryx_refsource_FEDORA
- FEDORA-2020-f6b3b6fb18 vendor-advisoryx_refsource_FEDORA
- FEDORA-2020-b2a2c830cf vendor-advisoryx_refsource_FEDORA
- USN-4329-1 vendor-advisoryx_refsource_UBUNTU
- FEDORA-2020-4e093619bb vendor-advisoryx_refsource_FEDORA
- openSUSE-SU-2020:0598 vendor-advisoryx_refsource_SUSE