The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2020-5260

CVE-2020-5260: Git Credential Disclosure Vulnerability

CVE-2020-5260 is a credential disclosure flaw in Git that tricks the system into sending stored credentials to attacker-controlled hosts via malicious URLs. This article covers technical details, affected versions, and patches.

Published: March 4, 2026

CVE-2020-5260 Overview

CVE-2020-5260 is a credential theft vulnerability in Git that allows attackers to trick Git into sending private credentials to attacker-controlled hosts. 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 containing 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.

Critical Impact

Attackers can steal stored credentials for any host by crafting malicious URLs, enabling credential theft across development environments and automated build systems.

Affected Products

  • 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, 2.26.1)
  • Canonical Ubuntu Linux (16.04 LTS, 18.04 LTS, 19.10)
  • Debian Linux (8.0, 9.0, 10.0)
  • Fedora (30, 31, 32)
  • openSUSE Leap (15.1)

Discovery Timeline

  • April 14, 2020 - CVE-2020-5260 published to NVD
  • April 14, 2020 - Git project releases security patches for multiple version branches
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2020-5260

Vulnerability Analysis

This vulnerability exploits a fundamental weakness in how Git parses and processes URLs before communicating with credential helper programs. When Git encounters a URL requiring authentication, it extracts components (protocol, host, path, username) and sends them to the credential helper via a line-based protocol. The protocol uses newline characters as delimiters between key-value pairs. By embedding URL-encoded newline characters (%0a) within the URL, an attacker can inject arbitrary key-value pairs into this protocol stream.

The attack is particularly dangerous because there are no restrictions on the relationship between the spoofed host and the actual target. An attacker can craft a URL that presents stored credentials for any host (including internal repositories, CI/CD systems, or private services) to a malicious host of their choosing. The credential helper, trusting the injected host= directive, retrieves and returns credentials for the victim host.

Root Cause

The root cause is improper input validation (CWE-20) combined with insufficiently protected credentials (CWE-522). The Git URL parser failed to reject or sanitize newline characters within URL components before passing them to the credential helper protocol. Since the credential helper protocol is newline-delimited, embedded newlines could inject additional protocol commands, effectively bypassing the intended authentication flow and causing credential misdirection.

Attack Vector

The vulnerability can be triggered by feeding a malicious URL to git clone, though the suspicious-looking URLs make direct social engineering difficult. The more likely attack vectors include:

  • Git submodules: A malicious repository could include submodules with crafted URLs that silently exploit the vulnerability when users clone the parent repository
  • Package systems: Build systems and package managers that automatically fetch Git repositories could process malicious URLs from dependency specifications
  • CI/CD pipelines: Automated systems that clone repositories based on user-provided input without URL validation

The attack requires no authentication and can be executed remotely over the network without user interaction in automated scenarios.

c
// Security patch from credential.c - Source: https://github.com/git/git/commit/9a6bbee8006c24b46a85d29e7b38cfa79e9ab21b
 {
 	if (!value)
 		return;
+	if (strchr(value, '\n'))
+		die("credential value for %s contains newline", key);
 	fprintf(fp, "%s=%s\n", key, value);
 }

Source: Git Commit 9a6bbee

The patch adds explicit validation to reject any credential values containing newline characters, preventing protocol injection attacks.

Detection Methods for CVE-2020-5260

Indicators of Compromise

  • Unexpected network connections to unknown hosts during Git operations
  • Git credential helper logs showing unusual host values or protocol sequences
  • Repository configurations (.gitmodules, .gitconfig) containing URLs with %0a or %0d encoded characters
  • Audit logs showing credential requests for hosts not matching the repository being cloned

Detection Strategies

  • Monitor Git operations for URLs containing URL-encoded newline characters (%0a, %0d, %0D, %0A)
  • Implement network monitoring to detect credential submissions to unexpected destinations
  • Scan Git repositories for malicious submodule URLs before cloning
  • Review CI/CD pipeline logs for suspicious Git clone operations or unusual repository URLs

Monitoring Recommendations

  • Enable verbose logging for Git credential helper operations to detect anomalies
  • Implement network segmentation and egress filtering to limit credential exposure
  • Deploy repository scanning tools to identify malicious .gitmodules files before developers clone them
  • Use SentinelOne's Singularity platform to monitor for suspicious process behavior during Git operations

How to Mitigate CVE-2020-5260

Immediate Actions Required

  • Update Git to a patched version immediately: 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
  • Audit existing repositories for malicious submodule URLs containing encoded newlines
  • Review and rotate any credentials that may have been exposed through automated Git operations
  • Disable automatic submodule cloning in CI/CD pipelines until systems are patched

Patch Information

The vulnerability was patched in versions released on April 14, 2020, going back to v2.17.x. The critical fix is contained in commit 9a6bbee8006c24b46a85d29e7b38cfa79e9ab21b. For organizations needing to backport the fix to older versions, applying this single commit is sufficient to protect clients against the vulnerability. The full releases include additional checks for git fsck but the core protection is in this commit.

Additional vendor patches are available:

  • GitHub Security Advisory GHSA-qm7j-c969-7j4q
  • Ubuntu Security Notice USN-4329-1
  • Debian Security Advisory DSA-4657
  • Gentoo GLSA 202004-13

Workarounds

  • Disable Git credential helpers temporarily by setting git config --global credential.helper ""
  • Manually verify all repository URLs and submodule URLs before cloning untrusted repositories
  • Use SSH-based authentication instead of HTTP/HTTPS with stored credentials where possible
  • Implement URL allowlisting in CI/CD systems to prevent cloning from untrusted sources
bash
# Configuration example - Disable credential helper temporarily
git config --global credential.helper ""

# Verify no malicious URLs in submodules before cloning
git config --get-regexp 'submodule\..*\.url' | grep -E '%0[aAdD]'

# Use SSH instead of HTTPS to avoid credential helper exposure
git config --global url."git@github.com:".insteadOf "https://github.com/"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechGit

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability32.54%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-20

  • CWE-522
  • Technical References
  • openSUSE Security Announcement

  • openSUSE Security Announcement

  • Packet Storm Vulnerability Analysis

  • Openwall OSS Security Update

  • Openwall OSS Security Update

  • Openwall OSS Security Update

  • Debian LTS Security Notice

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Kernel Mailing List Discussion

  • Gentoo GLSA 202004-13

  • Apple Security Update

  • Ubuntu Security Notice
  • Vendor Resources
  • Git Commit Changes

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-66413: Git for Windows NTLM Hash Disclosure Flaw

  • CVE-2024-50349: Git Information Disclosure Vulnerability

  • CVE-2024-52006: Git Information Disclosure Vulnerability

  • CVE-2024-50338: Git Credential Manager Info Disclosure
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English