malicious URLs may cause Git to present stored credentials to the wrong server
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-522.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Git | git | before 2.17.4; 2.18.0 to before 2.18.3; >= 2.19.0, 2.19.4; 2.20.0 to before 2.20.3; 2.21.0 to before 2.21.2; 2.22.0 to before 2.22.3; 2.23.0 to before 2.23.2; 2.24.0 to before 2.24.2; 2.25.0 to before 2.25.3; 2.26.0 to before 2.26.1 | 2.17.4, 2.18.3, 2.20.3, 2.21.2, 2.22.3, 2.23.2, 2.24.2, 2.25.3, 2.26.1 | Patch available | CNA |
- git VendorGit Affected before 2.17.4; 2.18.0 to before 2.18.3; >= 2.19.0, 2.19.4; 2.20.0 to before 2.20.3; 2.21.0 to before 2.21.2; 2.22.0 to before 2.22.3; 2.23.0 to before 2.23.2; 2.24.0 to before 2.24.2; 2.25.0 to before 2.25.3; 2.26.0 to before 2.26.1 Fixed in 2.17.4, 2.18.3, 2.20.3, 2.21.2, 2.22.3, 2.23.2, 2.24.2, 2.25.3, 2.26.1 Patch available CNA
CPE configurations NVD · 12
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:git:git:*:*:*:*:*:*:*:* | before 2.17.4; 2.22.0 to before 2.22.3 | Vulnerable | Git |
| cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* | 2.18.0 to before 2.18.3; 2.19.0 to before 2.19.4; 2.20.0 to before 2.20.3; 2.21.0 to before 2.21.2; 2.23.0 to before 2.23.2; 2.24.0 to before 2.24.2; 2.25.0 to before 2.25.3; 2.26.0 to before 2.26.1 | Vulnerable | Git-scm |
| cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:* | 16.04 | Vulnerable | Canonical |
| cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* | 18.04 | Vulnerable | Canonical |
| cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:* | 19.10 | Vulnerable | Canonical |
| cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:* | 30 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* | 31 | Vulnerable | Fedoraproject |
- cpe:2.3:a:git:git:*:*:*:*:*:*:*:* Versions before 2.17.4; 2.22.0 to before 2.22.3 Vulnerable ·Git
- cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* Versions 2.18.0 to before 2.18.3; 2.19.0 to before 2.19.4; 2.20.0 to before 2.20.3; 2.21.0 to before 2.21.2; 2.23.0 to before 2.23.2; 2.24.0 to before 2.24.2; 2.25.0 to before 2.25.3; 2.26.0 to before 2.26.1 Vulnerable ·Git-scm
- cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:* Versions 16.04 Vulnerable ·Canonical
- cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* Versions 18.04 Vulnerable ·Canonical
- cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:* Versions 19.10 Vulnerable ·Canonical
- cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:* Versions 30 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* Versions 31 Vulnerable ·Fedoraproject
Show 2 more CPE
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* | 32 | Vulnerable | Fedoraproject |
| cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:* | 15.1 | Vulnerable | openSUSE |
- cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* Versions 32 Vulnerable ·Fedoraproject
- cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:* Versions 15.1 Vulnerable ·openSUSE
Remediation
- Fix · CNA git (git) Fixed in 2.17.4, 2.18.3, 2.20.3, 2.21.2, 2.22.3, 2.23.2, 2.24.2, 2.25.3, 2.26.1
Red Hat 5 advisories
- RHSA-2020:3581 Released 2020-08-31 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.7) emacs-git-1.8.3.1-23.el7_7, emacs-git-el-1.8.3.1-23.el7_7, git-1.8.3.1-23.el7_7 +15
- Red Hat Enterprise Linux Server EUS (v. 7.7) git-1.8.3.1-23.el7_7, perl-Git-1.8.3.1-23.el7_7
- Red Hat Enterprise Linux Server Optional EUS (v. 7.7) emacs-git-1.8.3.1-23.el7_7, emacs-git-el-1.8.3.1-23.el7_7, git-all-1.8.3.1-23.el7_7 +13
- RHSA-2020:1513 Released 2020-04-21 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream (v. 8) git-2.18.2-2.el8_1, git-all-2.18.2-2.el8_1, git-core-2.18.2-2.el8_1 +11
- RHSA-2020:1518 Released 2020-04-21 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.0) git-2.18.2-2.el8_0, git-all-2.18.2-2.el8_0, git-core-2.18.2-2.el8_0 +11
Show 2 more Red Hat advisories
- RHSA-2020:1511 Released 2020-04-21 · Red Hat rating Importantgit security update
- Red Hat Enterprise Linux Client Optional (v. 7) emacs-git-1.8.3.1-22.el7_8, emacs-git-el-1.8.3.1-22.el7_8, git-1.8.3.1-22.el7_8 +15
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) emacs-git-1.8.3.1-22.el7_8, emacs-git-el-1.8.3.1-22.el7_8, git-1.8.3.1-22.el7_8 +15
- Red Hat Enterprise Linux Server (v. 7) git-1.8.3.1-22.el7_8, perl-Git-1.8.3.1-22.el7_8
- Red Hat Enterprise Linux Server Optional (v. 7) emacs-git-1.8.3.1-22.el7_8, emacs-git-el-1.8.3.1-22.el7_8, git-all-1.8.3.1-22.el7_8 +13
- Red Hat Enterprise Linux Workstation (v. 7) git-1.8.3.1-22.el7_8, perl-Git-1.8.3.1-22.el7_8
- Red Hat Enterprise Linux Workstation Optional (v. 7) emacs-git-1.8.3.1-22.el7_8, emacs-git-el-1.8.3.1-22.el7_8, git-all-1.8.3.1-22.el7_8 +13
- RHSA-2020:1503 Released 2020-04-21 · Red Hat rating Importantrh-git218-git security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-git218-git-2.18.2-3.el7, rh-git218-git-all-2.18.2-3.el7, rh-git218-git-core-2.18.2-3.el7 +13
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-git218-git-2.18.2-3.el7, rh-git218-git-all-2.18.2-3.el7, rh-git218-git-core-2.18.2-3.el7 +13
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-git218-git-2.18.2-3.el7, rh-git218-git-all-2.18.2-3.el7, rh-git218-git-core-2.18.2-3.el7 +13
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-git218-git-2.18.2-3.el7, rh-git218-git-all-2.18.2-3.el7, rh-git218-git-core-2.18.2-3.el7 +13
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-git218-git-2.18.2-3.el7, rh-git218-git-all-2.18.2-3.el7, rh-git218-git-core-2.18.2-3.el7 +13
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2020:1513 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.0) | Fixed | RHSA-2020:1518 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2020:1511 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2020:1511 |
| Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.7) | Fixed | RHSA-2020:3581 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2020:1511 |
| Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2020:3581 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2020:1511 |
| Red Hat Enterprise Linux Server Optional EUS (v. 7.7) | Fixed | RHSA-2020:3581 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2020:1511 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2020:1511 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2020:1503 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) | Fixed | RHSA-2020:1503 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) | Fixed | RHSA-2020:1503 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2020:1503 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2020:1503 |
Not affected: 1 product
- Red Hat Enterprise Linux 6
Timeline
- 2026-10-02 Threatist record created from CVE-2020-5260
References
Patch 2
Advisory 15
- DSA-4657
- [debian-lts-announce] 20200415 [SECURITY] [DLA 2177-1] git security update
- http://packetstormsecurity.com/files/157250/Git-Credential-Helper-Protocol-Newline-Injection.html
- [oss-security] 20200415 Re: CVE-2020-5260: Git: malicious URLs may cause Git to present stored credentials to the wrong server
- openSUSE-SU-2020:0524
- https://support.apple.com/kb/HT211141
- FEDORA-2020-cdef88bb89
- [oss-security] 20200420 CVE-2020-11008: Git: Malicious URLs can still cause Git to send a stored credential to the wrong server
- GLSA-202004-13
- FEDORA-2020-c6548b488f
- FEDORA-2020-f6b3b6fb18
- FEDORA-2020-b2a2c830cf
- USN-4329-1
- FEDORA-2020-4e093619bb
- openSUSE-SU-2020:0598
More Git vulnerabilities
- TI-2024-21101 Git's recursive clones on case-insensitive filesystems that support symlinks are susceptible to Remote Code Execution CVSS 3.1CRITICAL 9.1
- TI-2022-09232 Command injection in git CVSS 3.1CRITICAL 9.8
- TI-2008-05233 The web interface in git (gitweb) 1.5.x before 1.5.6 allows remote attackers to execute… CVSS 2.0HIGH 7.5
- TI-2008-05232 The web interface in git (gitweb) 1.5.x before 1.5.5 allows remote attackers to execute… CVSS 2.0HIGH 7.5
- TI-2008-03393 Stack-based buffer overflow in the (1) diff_addremove and (2) diff_change functions in… CVSS 2.0HIGH 7.5
- TI-2006-00463 Buffer overflow in git-checkout-index in GIT before 1.1.5 allows remote attackers to… CVSS 2.0HIGH 7.5
Sources
- CVE-2020-5260 · CVE Program
- CVE-2020-5260 · NVD
- FIRST EPSS
- CVE-2020-5260 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences