CVE-2020-5260 malicious URLs may cause Git to present stored credentials to the wrong server
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- UbuntuDebian
Description
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/git(Debian:12) | < 1:2.26.1-1 | 1:2.26.1-1 |
| debian/git(Debian:13) | < 1:2.26.1-1 | 1:2.26.1-1 |
| debian/git(Debian:14) | < 1:2.26.1-1 | 1:2.26.1-1 |
| git | < 2.17.4 | 2.17.4 |
| git | >= 2.22.0, < 2.22.3 | 2.22.3 |
| git-scm git | >= 2.18.0, < 2.18.3 | 2.18.3 |
| git-scm git | >= 2.19.0, < 2.19.4 | 2.19.4 |
| git-scm git | >= 2.20.0, < 2.20.3 | 2.20.3 |
| git-scm git | >= 2.21.0, < 2.21.2 | 2.21.2 |
| git-scm git | >= 2.23.0, < 2.23.2 | 2.23.2 |
| git-scm git | >= 2.24.0, < 2.24.2 | 2.24.2 |
| git-scm git | >= 2.25.0, < 2.25.3 | 2.25.3 |
| git-scm git | >= 2.26.0, < 2.26.1 | 2.26.1 |
| Canonical Ubuntu Linux | = 16.04 | No fix listed |
| Canonical Ubuntu Linux | = 18.04 | No fix listed |
| Canonical Ubuntu Linux | = 19.10 | No fix listed |
| debian linux | = 8.0 | No fix listed |
| debian linux | = 9.0 | No fix listed |
| debian linux | = 10.0 | No fix listed |
| fedoraproject fedora | = 30 | No fix listed |
| fedoraproject fedora | = 31 | No fix listed |
| fedoraproject fedora | = 32 | No fix listed |
| openSUSE leap | = 15.1 | No fix listed |
| git | = < 2.17.4 | No fix listed |
| git | = >= 2.18.0, < 2.18.3 | No fix listed |
Show 49 more
| Product | Affected versions | Fixed in |
|---|---|---|
| git | = >= 2.19.0, 2.19.4 | No fix listed |
| git | = >= 2.20.0, < 2.20.3 | No fix listed |
| git | = >= 2.21.0, < 2.21.2 | No fix listed |
| git | = >= 2.22.0, < 2.22.3 | No fix listed |
| git | = >= 2.23.0, < 2.23.2 | No fix listed |
| git | = >= 2.24.0, < 2.24.2 | No fix listed |
| git | = >= 2.25.0, < 2.25.3 | No fix listed |
| git | = >= 2.26.0, < 2.26.1 | No fix listed |
| alpine/git(Alpine:v3.10) | >= 2.22.0, < 2.22.3-r0 | 2.22.3-r0 |
| alpine/git(Alpine:v3.11) | >= 2.24.0, < 2.24.2-r0 | 2.24.2-r0 |
| alpine/git(Alpine:v3.12) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.13) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.14) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.15) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.16) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.17) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.18) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.19) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.20) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.21) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.22) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.23) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.24) | >= 2.26.0, < 2.26.1-r0 | 2.26.1-r0 |
| alpine/git(Alpine:v3.8) | >= 2.18.0, < 2.18.3-r0 | 2.18.3-r0 |
| alpine/git(Alpine:v3.9) | >= 2.20.0, < 2.20.3-r0 | 2.20.3-r0 |
| ubuntu/git(Ubuntu:16.04) | < 1:2.7.4-0ubuntu1.8 | 1:2.7.4-0ubuntu1.8 |
| ubuntu/git(Ubuntu:16.04) | = 1:2.5.0-1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.6.2-1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.6.3-1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.6.4-1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.0~rc3-1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.0-1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.3-0ubuntu1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.1 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.2 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.3 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.4 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.5 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.6 | No fix listed |
| ubuntu/git(Ubuntu:16.04) | = 1:2.7.4-0ubuntu1.7 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | < 1:2.17.1-1ubuntu0.6 | 1:2.17.1-1ubuntu0.6 |
| ubuntu/git(Ubuntu:18.04) | = 1:2.14.1-1ubuntu4 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | = 1:2.15.1-1ubuntu2 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | = 1:2.17.0-1ubuntu1 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | = 1:2.17.1-1ubuntu0.1 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | = 1:2.17.1-1ubuntu0.3 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | = 1:2.17.1-1ubuntu0.4 | No fix listed |
| ubuntu/git(Ubuntu:18.04) | = 1:2.17.1-1ubuntu0.5 | No fix listed |
References
- Debian Security Tracker CVE-2020-5260 vendor-advisory
- openSUSE-SU-2020:0524 third-party-advisory vendor-advisory
- openSUSE-SU-2020:0598 third-party-advisory vendor-advisory
- packetstormsecurity.com third-party-advisory vdb-entry
- [oss-security] 20200415 CVE-2020-5260: Git: malicious URLs may cause Git to present stored credentials to the wrong server mailing-list
- [oss-security] 20200415 Re: CVE-2020-5260: Git: malicious URLs may cause Git to present stored credentials to the wrong server mailing-list third-party-advisory
- [oss-security] 20200420 CVE-2020-11008: Git: Malicious URLs can still cause Git to send a stored credential to the wrong server mailing-list third-party-advisory
- github.com patch third-party-advisory
- github.com mitigation patch third-party-advisory
- [debian-lts-announce] 20200415 [SECURITY] [DLA 2177-1] git security update mailing-list third-party-advisory
- FEDORA-2020-4e093619bb vendor-advisory
- FEDORA-2020-c6548b488f vendor-advisory
- FEDORA-2020-b2a2c830cf vendor-advisory
- FEDORA-2020-f6b3b6fb18 vendor-advisory
- FEDORA-2020-cdef88bb89 vendor-advisory
- lore.kernel.org
- GLSA-202004-13 third-party-advisory vendor-advisory
- support.apple.com third-party-advisory
- USN-4329-1 third-party-advisory vendor-advisory
- DSA-4657 third-party-advisory vendor-advisory
- security.alpinelinux.org vendor-advisory
- ubuntu.com issue-tracking
- ubuntu.com vendor-advisory
- www.cve.org issue-tracking