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-50349

CVE-2024-50349: Git Information Disclosure Vulnerability

CVE-2024-50349 is an information disclosure vulnerability in Git that allows attackers to use ANSI escape sequences to trick users into sending credentials to malicious sites. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: January 22, 2026

CVE-2024-50349 Overview

CVE-2024-50349 is an improper output encoding vulnerability in Git, the widely-used distributed revision control system. When Git prompts for credentials via a terminal (without using a credential helper), it displays the host name for which authentication is required. However, URL-encoded parts are decoded before display, allowing attackers to inject ANSI escape sequences into crafted URLs. These sequences can manipulate terminal output to deceive users into providing credentials for what appears to be a trusted Git hosting site, when in reality the credentials are being sent to an attacker-controlled server.

Critical Impact

Attackers can craft malicious repository URLs containing ANSI escape sequences that manipulate terminal displays, potentially tricking developers into providing credentials to untrusted sites while believing they are authenticating to legitimate Git hosting services.

Affected Products

  • Git versions prior to v2.48.1
  • Git versions v2.47.x prior to v2.47.2, v2.46.x prior to v2.46.3, v2.45.x prior to v2.45.3, v2.44.x prior to v2.44.3, v2.43.x prior to v2.43.6, v2.42.x prior to v2.42.4, v2.41.x prior to v2.41.3, and v2.40.x prior to v2.40.4
  • Debian Linux 11.0

Discovery Timeline

  • 2025-01-14 - CVE-2024-50349 published to NVD
  • 2025-12-18 - Last updated in NVD database

Technical Details for CVE-2024-50349

Vulnerability Analysis

This vulnerability falls under CWE-116 (Improper Encoding or Escaping of Output). The core issue lies in how Git processes and displays URL-encoded data during terminal credential prompts. When a user attempts to clone or fetch from a repository that requires authentication, Git decodes URL-encoded characters before printing the hostname to the terminal. This behavior becomes dangerous when the URL contains encoded ANSI escape sequences.

ANSI escape sequences are special character combinations that terminals interpret as commands to manipulate display output—changing colors, moving the cursor, or clearing portions of the screen. By embedding these sequences in a malicious URL, an attacker can craft a prompt that appears to request credentials for a trusted domain like github.com while actually sending the credentials to an attacker-controlled server.

Root Cause

The root cause is insufficient output sanitization in Git's credential prompting mechanism. When Git decodes URL-encoded parts of the repository URL for display, it fails to filter or escape ANSI control characters before outputting them to the terminal. This allows the raw escape sequences to be interpreted by the terminal emulator, enabling visual manipulation of the credential prompt.

Attack Vector

The attack requires social engineering to convince a victim to clone a malicious repository URL. The attacker constructs a URL with carefully crafted ANSI escape sequences that, when decoded and displayed in the terminal:

  1. Overwrite or hide the actual malicious hostname
  2. Display a trusted hostname (e.g., github.com) in its place
  3. Prompt the user for credentials that are then sent to the attacker's server

This attack is particularly effective during recursive clones where submodule URLs might not be carefully inspected by the user.

The vulnerability exploits the trust users place in terminal output. When a user sees a familiar hostname in the credential prompt, they are likely to enter their password without suspecting the display has been manipulated. The attacker's server then captures these credentials, potentially compromising access to the user's legitimate Git repositories.

Detection Methods for CVE-2024-50349

Indicators of Compromise

  • Unusual or unexpected credential prompts when cloning repositories
  • Repository URLs containing unusual URL-encoded characters or escape sequences
  • Authentication requests to unfamiliar or suspicious hostnames appearing after repository operations
  • Log entries showing credential transmission to unexpected endpoints

Detection Strategies

  • Monitor Git operations for URLs containing encoded ANSI sequences (e.g., %1B, %5B, %0D, %0A)
  • Implement endpoint detection rules to flag Git clone operations from untrusted or suspicious sources
  • Review Git configuration and submodule URLs in existing repositories for malicious patterns
  • Use credential helpers that do not rely on terminal prompts, reducing exposure to this vulnerability

Monitoring Recommendations

  • Enable verbose logging for Git operations to capture full URL strings before credential prompts
  • Deploy network monitoring to detect credential submission to unauthorized endpoints
  • Implement terminal session recording for security-sensitive development environments
  • Establish alerts for Git operations involving unfamiliar remote repository URLs

How to Mitigate CVE-2024-50349

Immediate Actions Required

  • Upgrade Git to a patched version immediately: v2.48.1, v2.47.2, v2.46.3, v2.45.3, v2.44.3, v2.43.6, v2.42.4, v2.41.3, or v2.40.4
  • Avoid cloning repositories from untrusted or unfamiliar URLs until the update is applied
  • Configure and use credential helpers instead of relying on terminal prompts for authentication
  • Exercise caution with recursive clone operations, especially from external sources

Patch Information

The vulnerability has been addressed in Git commits 7725b81 and c903985. These fixes are included in release versions v2.48.1, v2.47.2, v2.46.3, v2.45.3, v2.44.3, v2.43.6, v2.42.4, v2.41.3, and v2.40.4. Users should upgrade to one of these versions or later. Debian users should refer to the Debian LTS Announcement for distribution-specific update instructions. For complete details, see the GitHub Security Advisory GHSA-hmg8-h7qf-7cxr.

Workarounds

  • Configure a credential helper (e.g., git config --global credential.helper cache or git config --global credential.helper store) to avoid terminal-based credential prompts
  • Manually inspect repository URLs before cloning, especially checking for suspicious URL-encoded characters
  • Use SSH-based authentication instead of HTTPS with password prompts where possible
  • Avoid recursive cloning (--recursive) from untrusted sources until Git is updated
bash
# Configure credential helper to avoid terminal prompts
git config --global credential.helper cache

# Or use SSH authentication instead of HTTPS
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

  • SeverityLOW

  • CVSS Score2.1

  • EPSS Probability0.39%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-116
  • Technical References
  • Debian LTS Announcement
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Commit Update

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

  • CVE-2024-52006: Git Information Disclosure Vulnerability

  • CVE-2024-50338: Git Credential Manager Info Disclosure

  • 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