cbcvebase.
CVE-2020-5260
published 2020-04-14

CVE-2020-5260: 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…

PriorityP354high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
EPSS
10.05%
95.0th percentile
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

76 ranges· showing 25
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debiandebian_linux
debiandebian_linux
debiangit< git 1:2.39.5-0+deb12u2 (bookworm)git 1:2.39.5-0+deb12u2 (bookworm)
debiangit< git 1:2.26.2-1 (bookworm)git 1:2.26.2-1 (bookworm)
debiangit< git 1:2.26.1-1 (bookworm)git 1:2.26.1-1 (bookworm)
fedoraprojectfedora
fedoraprojectfedora
fedoraprojectfedora
git-scmgit< 2.17.52.17.5
git-scmgit>= 2.18.0 < 2.18.42.18.4
git-scmgit>= 2.18.0 < 2.18.32.18.3
git-scmgit>= 2.19.0 < 2.19.52.19.5
git-scmgit>= 2.19.0 < 2.19.42.19.4
git-scmgit>= 2.20.0 < 2.20.42.20.4
git-scmgit>= 2.20.0 < 2.20.32.20.3
git-scmgit>= 2.21.0 < 2.21.32.21.3
git-scmgit>= 2.21.0 < 2.21.22.21.2
git-scmgit>= 2.22.0 < 2.22.42.22.4
git-scmgit>= 2.23.0 < 2.23.32.23.3
git-scmgit>= 2.23.0 < 2.23.22.23.2

Detection & IOCsextracted from sources · hover to see the quote

commandgit clone <malicious_URL_with_encoded_newline>
other%0a (encoded newline in URL)
otherhost=github.com (credential-protocol injection string in URL)
  • Inspect URLs passed to `git clone` (including via submodules or package managers) for encoded newline characters (%0a) in the hostname or username portion, which are the primary exploit delivery mechanism for CVE-2020-5260.
  • Monitor for `git clone` invocations that originate from automated systems processing untrusted URLs (e.g., submodule updates, package managers), as these are the most likely exploitation vectors where the malicious URL is not visible to the user.
  • Audit `.gitmodules` files in repositories for URLs containing encoded newlines (%0a) or credential-protocol injection strings before running `git submodule update`.
  • Detect use of vulnerable credential helpers (store, cache, osxkeychain) in Git configuration on hosts running unpatched Git versions prior to 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, or 2.26.1.
  • ·Git's built-in credential helpers ('store', 'cache') and the 'osxkeychain' contrib helper are confirmed vulnerable and will leak credentials when exploited; Git Credential Manager for Windows is confirmed safe even on unpatched Git versions.
  • ·Red Hat Enterprise Linux 6 is not affected because the vulnerable Git version (1.7.9-rc0 and later) was never packaged for that platform.
  • ·The fix for CVE-2020-5260 (commit 9a6bbee) is sufficient to protect clients; the full release also includes extra checks for `git fsck` but those are not required for client protection.

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
osv7.5HIGH
vendor_debian9.3CRITICAL
vendor_redhat9.3CRITICAL
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.