CVE-2020-5260: malicious URLs may cause Git to present stored credentials to the wrong server
Advisory generated from the CVE record, CISA, Exploit Observer and VEDAS: what it is, whether it is exploited, who is affected, and how to fix and detect it.
Generated by VEDAS. Scores as of 2026-11-04 15:41 UTC. Rebuilt every few hours from cve-scores, CISA KEV and vedas-signatures. How this works and its limits.
What it is
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.
Description quoted from the CVE record (assigned by GitHub_M, published 2020-04-14).
Weakness: CWE-20: Improper Input Validation
How it can be exploited
Exploitable over the network with low attack complexity needing no privileges and a user must take an action. Impact: confidentiality high, integrity high, availability none. CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Public exploit evidence (Exploit Observer)
Exploit Observer found 3 code repositories and 1 research write-up naming this CVE.
Code repositories that name a CVE are often scanners, copies or fakes, and some are malware. Read the code before running anything.
See all 20 references on Exploit Observer
Live scores
- EPSS
- 0.149
likely to be attacked soon - VEDAS
- 0.895
likely exploited - On CISA KEV
- Not listed
- Detection rule
- No public rule yet
Who is affected
| Product | Affected | Not affected |
|---|---|---|
| git | version < 2.17.4 version >= 2.18.0, < 2.18.3 version >= 2.19.0, 2.19.4 version >= 2.20.0, < 2.20.3 version >= 2.21.0, < 2.21.2 version >= 2.22.0, < 2.22.3 version >= 2.23.0, < 2.23.2 version >= 2.24.0, < 2.24.2 and 2 more ranges | Not stated |
Version ranges exactly as the CVE record states them. “Before X” means X is the first fixed version.
How to fix it
Vendor guidance:
- DSA-4657 (vendor-advisory, x_refsource_DEBIAN)
- openSUSE-SU-2020:0524 (vendor-advisory, x_refsource_SUSE)
- FEDORA-2020-cdef88bb89 (vendor-advisory, x_refsource_FEDORA)
- GLSA-202004-13 (vendor-advisory, x_refsource_GENTOO)
- FEDORA-2020-c6548b488f (vendor-advisory, x_refsource_FEDORA)
- FEDORA-2020-f6b3b6fb18 (vendor-advisory, x_refsource_FEDORA)
- FEDORA-2020-b2a2c830cf (vendor-advisory, x_refsource_FEDORA)
- USN-4329-1 (vendor-advisory, x_refsource_UBUNTU)
2 more
- FEDORA-2020-4e093619bb (vendor-advisory, x_refsource_FEDORA)
- openSUSE-SU-2020:0598 (vendor-advisory, x_refsource_SUSE)
How to detect it
There is no open VEDAS detection rule for this bug yet. It is listed on the detection gaps page if CISA has confirmed attacks.
References
Vendor advisories and patches
- DSA-4657 (vendor-advisory, x_refsource_DEBIAN)
- openSUSE-SU-2020:0524 (vendor-advisory, x_refsource_SUSE)
- FEDORA-2020-cdef88bb89 (vendor-advisory, x_refsource_FEDORA)
- GLSA-202004-13 (vendor-advisory, x_refsource_GENTOO)
- FEDORA-2020-c6548b488f (vendor-advisory, x_refsource_FEDORA)
- FEDORA-2020-f6b3b6fb18 (vendor-advisory, x_refsource_FEDORA)
- FEDORA-2020-b2a2c830cf (vendor-advisory, x_refsource_FEDORA)
- USN-4329-1 (vendor-advisory, x_refsource_UBUNTU)
- FEDORA-2020-4e093619bb (vendor-advisory, x_refsource_FEDORA)
- openSUSE-SU-2020:0598 (vendor-advisory, x_refsource_SUSE)
Other references
- https://github.com/git/git/security/advisories/GHSA-qm7j-c969-7j4q (x_refsource_CONFIRM)
- https://github.com/git/git/commit/9a6bbee8006c24b46a85d29e7b38cfa79e9ab21b (x_refsource_MISC)
- https://lore.kernel.org/git/xmqqy2qy7xn8.fsf%40gitster.c.googlers.com/ (x_refsource_MISC)
- [debian-lts-announce] 20200415 [SECURITY] [DLA 2177-1] git security update (mailing-list, x_refsource_MLIST)
- [oss-security] 20200415 CVE-2020-5260: Git: malicious URLs may cause Git to present stored credentials to the wrong server (mailing-list, x_refsource_MLIST)
- http://packetstormsecurity.com/files/157250/Git-Credential-Helper-Protocol-Newline-Injection.html (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-list, x_refsource_MLIST)
- https://support.apple.com/kb/HT211141 (x_refsource_CONFIRM)
- [oss-security] 20200420 CVE-2020-11008: Git: Malicious URLs can still cause Git to send a stored credential to the wrong server (mailing-list, x_refsource_MLIST)
Other databases
Where this comes from
This advisory is generated automatically by VEDAS from: CVE.org record, cve-scores (EPSS and VEDAS), Exploit Observer. Text in quotes is reproduced from the source; everything else is a fixed template filled with source fields. Nothing here is written by a language model. Check the vendor advisory before acting, and read how VEDAS and Exploit Observer work, and their limits.