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-2024-50338

CVE-2024-50338: Git Credential Manager Info Disclosure

CVE-2024-50338 is an information disclosure vulnerability in Git Credential Manager caused by newline handling mismatches. Attackers can craft malicious URLs to capture credentials for other remotes during cloning operations.

Updated: January 22, 2026

CVE-2024-50338 Overview

Git Credential Manager (GCM) is a secure Git credential helper built on .NET that runs on Windows, macOS, and Linux. A critical vulnerability exists in how GCM handles newline characters compared to Git itself. The Git credential protocol is text-based over standard input/output, consisting of key-value pairs in the format key=value. While Git's documentation restricts the use of NUL (\0) characters and newlines in keys or values, a mismatch in newline treatment between Git and GCM allows attackers to craft malicious remote URLs that can capture credentials for other Git remotes.

The vulnerability stems from the .NET StreamReader class used by GCM, which considers LF, CRLF, and CR as valid line endings, whereas Git only considers LF and CRLF. This discrepancy means that a single carriage return (CR) character is treated as a newline by GCM but not by Git, enabling credential injection attacks.

Critical Impact

Attackers can craft malicious repositories that, when cloned or interacted with, capture credentials intended for other Git remotes. The attack is particularly dangerous with recursive cloning of repositories containing submodules.

Affected Products

  • Git Credential Manager versions prior to 2.6.1
  • Git Credential Manager on Windows, macOS, and Linux platforms
  • Applications using GCM with the --recursive clone option for submodules

Discovery Timeline

  • 2025-01-14 - CVE CVE-2024-50338 published to NVD
  • 2025-01-14 - Last updated in NVD database

Technical Details for CVE-2024-50338

Vulnerability Analysis

This vulnerability (CWE-200: Information Exposure) exploits the inconsistent handling of newline characters between Git and Git Credential Manager. When Git reads from standard input for the credential protocol, it uses strbuf_getline which calls strbuf_getdelim_strip_crlf, treating both LF and CRLF as valid newline characters. Git also validates that no newline exists in credential values by checking for the line-feed character (LF, \n).

However, Git Credential Manager uses the .NET standard library StreamReader class with its ReadLineAsync method, which considers LF, CRLF, and CR as valid line endings. This creates a parsing mismatch where a standalone carriage return (CR, \r) is interpreted as a newline by GCM but not by Git.

An attacker can exploit this by embedding CR characters in a malicious remote URL. When a victim clones or interacts with the malicious repository, GCM parses the input differently than Git intended, allowing the attacker to inject additional credential protocol fields that redirect authentication to an attacker-controlled remote.

Root Cause

The root cause is the inconsistent line ending treatment between Git's C implementation and the .NET StreamReader class used by GCM. Git's strbuf_getdelim_strip_crlf function in the credential parsing code specifically handles LF and CRLF sequences, but the .NET StreamReader.ReadLineAsync method additionally recognizes standalone CR characters as line terminators. This implementation difference in the .NET runtime source code allows credential protocol injection through carefully crafted URLs containing CR characters.

Attack Vector

The attack vector is network-based and requires user interaction. An attacker creates a malicious Git repository with a remote URL containing embedded CR characters. When a victim performs any Git operation requiring authentication (clone, fetch, push), the malicious URL causes GCM to interpret additional credential fields injected by the attacker.

The attack is significantly amplified when using the --recursive clone option, as submodule URLs are not visible to the user before cloning begins. An attacker can hide malicious submodule configurations that redirect credentials to attacker-controlled endpoints.

The attack flow works as follows: the victim initiates a clone operation, Git sends credential request to GCM via standard input, the malicious URL containing CR characters causes GCM to parse additional injected fields, and GCM may then send credentials to an attacker-controlled remote instead of the intended destination.

Detection Methods for CVE-2024-50338

Indicators of Compromise

  • Git remote URLs containing carriage return (\r or %0D) characters in repository configurations
  • Unexpected credential prompts when cloning repositories from untrusted sources
  • Authentication requests to unknown or suspicious Git hosting endpoints
  • Anomalous network connections to non-standard Git server addresses during clone operations

Detection Strategies

  • Monitor Git operations for remote URLs containing embedded control characters (especially CR/\r)
  • Implement network monitoring to detect authentication traffic to unexpected Git endpoints
  • Review .gitmodules files in repositories for suspicious submodule URLs before recursive cloning
  • Deploy endpoint detection to identify Git Credential Manager versions prior to 2.6.1

Monitoring Recommendations

  • Enable verbose logging for Git operations to capture credential helper interactions
  • Monitor for unusual authentication patterns where credentials are requested for unexpected remotes
  • Implement repository scanning policies to inspect .gitmodules and remote configurations
  • Set up alerts for Git clone operations with the --recursive flag from untrusted sources

How to Mitigate CVE-2024-50338

Immediate Actions Required

  • Upgrade Git Credential Manager to version 2.6.1 or later immediately
  • Avoid using the --recursive clone option when cloning repositories from untrusted sources
  • Manually inspect .gitmodules files and remote URLs in repositories before interacting with them
  • Review recent Git operations for any suspicious credential requests or unexpected authentication prompts

Patch Information

The vulnerability has been patched in Git Credential Manager version 2.6.1. Users should upgrade immediately by downloading the latest release from the official GitHub release page. The fix addresses the newline handling mismatch by properly validating input in the StreamExtensions implementation. For detailed information about the security fix, see the GitHub Security Advisory GHSA-86c2-4x57-wc8g.

Workarounds

  • Only interact with trusted remote repositories until the patch can be applied
  • Clone repositories without the --recursive flag, then manually inspect submodule URLs before initializing them
  • Use git submodule init followed by manual URL inspection before running git submodule update
  • Consider using alternative credential helpers temporarily if immediate upgrade is not possible
bash
# Safe submodule cloning workflow (workaround)
# Clone without recursive flag
git clone https://example.com/repo.git

# Inspect submodule URLs before initializing
cd repo
cat .gitmodules

# Only after verification, initialize submodules
git submodule init
git submodule update

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.4

  • EPSS Probability0.14%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-200
  • Technical References
  • Git Documentation on Credentials

  • GitHub Runtime Source Code

  • GitHub StreamExtensions Source Code

  • GitHub Compare Commits

  • GitHub Release v2.6.1

  • GitHub Security Advisory GHSA-86c2-4x57-wc8g

  • GitHub Credential Source Code

  • Microsoft Documentation on StreamReader
  • 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-2022-39253: Git Information Disclosure Vulnerability
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