CVE Tools

CVE-2020-5260

malicious URLs may cause Git to present stored credentials to the wrong server

CVE-2020-5260 is an input validation in Red Hat Inc. Red Hat Enterprise Linux (CVSS 9.3, Critical).

Public exploit available. Not confirmed exploited in the wild yet. A vendor fix is available.

Check it yourself

Nuclei · 1 templateOpenVAS · 43 checks

e.g. Git Credential Injection Vulnerability · OID 1.3.6.1.4.1.25623.1.0.704657

Run the check

Published Updated Sources: CVE.org, NVD, BDU

What to do

The vendor has published a fix. Version details are below where the sources state them.

  • GitAffected: < 2.17.4Upgrade to: not statedAffected: >= 2.18.0, < 2.18.3Upgrade to: not statedAffected: >= 2.19.0, 2.19.4Upgrade to: not statedAffected: >= 2.20.0, < 2.20.3Upgrade to: not stated + 6 more branchesStated by: CVE record
  • Red Hat Inc. Red Hat Enterprise LinuxAffected: 7Upgrade to: not statedStated by: BDU
  • Canonical Ltd. UbuntuAffected: 16.04 LTSUpgrade to: not statedStated by: BDU
  • RusBITech-Astra Astra Linux Special EditionAffected: 1.5 «Smolensk»Upgrade to: not statedStated by: BDU
  • Open-source community Debian GNU/LinuxAffected: 9Upgrade to: not statedStated by: BDU

Versions as the sources state them. 8 more products have version data. Full version matrix after sign-in

Steps

Written by AI from the record
  1. Check your Git version by running git --version on any machine used for cloning repositories or submodules.
  2. If the version is older than 2.17.4, 2.18.3, 2.19.4, 2.20.3, 2.21.2, 2.22.3, 2.23.2, 2.24.2, or 2.25.3, upgrade immediately.
  3. Update to at least Git 2.18.3 (or the latest patched release for your branch) using your OS package manager or the official Git installer.
  4. Avoid cloning repositories or submodules from untrusted or unexpected URLs until updated.
  5. If you maintain automated build or package systems that clone Git URLs without review, prioritize patching those systems first.
apt install git (or your package manager's upgrade command) to git >= 2.18.3
Check it yourselfA free Nuclei and OpenVAS check exists for this CVE. Run it against your hosts.
Is your organisation exposed?Request a free pilot to see which of your systems are exposed. Scope is agreed before testing.

SeguriScan is made by IntruForce, a cybersecurity company in Madrid, Spain. Links open intruforce.com.

What it is

From the CVE record

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.

In plain language

Written by AI from the record

A flaw in Git could trick it into sending your saved login credentials to the wrong, attacker-controlled server, but it requires you to clone a specially crafted link so most normal use isn't at risk.

Git's credential-helper protocol can be manipulated via a maliciously crafted URL containing an encoded newline, causing it to disclose stored credentials for one host to an attacker-controlled host during a clone operation.

If you're affected

  • Stolen developer/service credentials
  • Unauthorized access to private repos
  • Supply-chain compromise via submodules
  • Downstream credential leakage

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS97th
Public exploit
CISA KEV

Not in the catalog. CISA has not confirmed exploitation.

Public exploits

1 source with a proof of concept or module.

Exploit links, PoCs and Metasploit modules after sign-in
EPSS

15% chance of exploitation activity in the next 30 days, which ranks it in the 97th percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

The patch came 471 days before any public exploit.

  1. EPSS band changelow → moderateepss band change
  2. EPSS band changemoderate → low
  3. EPSS band changemoderate → lowepss band change
  4. EPSS band change0 → moderateepss band change
  5. EPSS band changemoderate → low
  6. EPSS band changemoderate → 0epss band change

Affected products

Technical detail

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

Scored 9.3 by NVD.

How it is reached

  • Attack Vector NetworkExploitable remotely over the network without any special conditions
  • Attack Complexity LowNo special conditions — the attack can be reliably reproduced
  • Privileges Required NoneNo authentication required — anyone can exploit this
  • User Interaction RequiredA user must click a link, open a file, or perform some action

Scope

  • Scope ChangedThe exploit can affect other components (e.g. sandbox escape, host compromise from VM)

Impact if exploited

  • Confidentiality HighTotal information disclosure — all data in the component is compromised
  • Integrity HighTotal loss of integrity — attacker can modify any data in the component
  • Availability NoneNo availability impact

Weaknesses

ATT&CK techniques

Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.

Sources

Questions about CVE-2020-5260

Is CVE-2020-5260 being exploited?
Not confirmed. Public exploit code exists (1 source), but CVE-2020-5260 is not in CISA KEV. EPSS puts the chance of exploitation in the next 30 days at 15%.
Which versions are affected by CVE-2020-5260?
Red Hat Enterprise Linux: 7. Git: < 2.17.4; >= 2.18.0, < 2.18.3; >= 2.19.0, 2.19.4. Ubuntu: 16.04 LTS. 10 more products are listed in the record.
How do I fix or mitigate CVE-2020-5260?
The vendor has published a fix. The advisory is on github.com.

Last updated

Related articles

All articles

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Red Hat Enterprise Linux, not every advisory. This one: public exploit.