Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-52005

CVE-2024-52005: Git XSS via ANSI Escape Sequences Vulnerability

CVE-2024-52005 is an XSS vulnerability in Git that exploits ANSI escape sequences in sideband channel messages, allowing attackers to mislead users or execute untrusted scripts. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: January 28, 2026

CVE-2024-52005 Overview

CVE-2024-52005 is a high-severity vulnerability in Git, the widely-used source code management tool. The vulnerability exists in Git's "sideband channel," which is used to transport informational or error messages from a remote Git server to the client during clone, fetch, or push operations. These messages are prefixed with "remote:" and printed directly to the standard error output without proper sanitization of ANSI escape sequences.

Since most modern terminals interpret ANSI control sequences, a malicious actor operating a Git server can inject carefully crafted escape sequences into sideband messages. This can be exploited to hide or misrepresent information displayed to the user, or potentially mislead users into executing untrusted scripts.

Critical Impact

Attackers can leverage malicious Git servers to inject ANSI escape sequences that manipulate terminal output, potentially deceiving users into running untrusted code or hiding malicious activity during Git operations.

Affected Products

  • Git (multiple versions affected)
  • Git-based tools and applications that process sideband messages
  • Development environments using Git for source control

Discovery Timeline

  • January 15, 2025 - CVE-2024-52005 published to NVD
  • December 18, 2025 - Last updated in NVD database

Technical Details for CVE-2024-52005

Vulnerability Analysis

This vulnerability is classified as CWE-116 (Improper Encoding or Escaping of Output). The core issue stems from Git's failure to sanitize ANSI escape sequences in messages received through the sideband channel during client-server communications.

When a user performs Git operations that communicate with a remote server (such as git clone, git fetch, or git push), the server can send messages through a dedicated sideband channel. These messages are intended for informational purposes and are displayed directly in the user's terminal with a "remote:" prefix.

The vulnerability requires network access and user interaction (the user must initiate a Git operation against a malicious server). When exploited, an attacker can achieve high impact on confidentiality, integrity, and availability by manipulating what the user sees during Git operations.

Root Cause

The root cause is insufficient output encoding when Git processes sideband messages. Git fails to escape or filter ANSI control sequences before writing them to standard error, trusting that server-provided content is safe for terminal display. Modern terminals interpret these escape sequences for cursor positioning, text color changes, screen clearing, and other display manipulations that can be abused by attackers.

Attack Vector

The attack vector is network-based, requiring a malicious Git server to deliver the payload. An attacker could:

  1. Set up a malicious Git repository server
  2. Trick a victim into cloning or fetching from this server
  3. Send crafted sideband messages containing ANSI escape sequences
  4. Manipulate the terminal display to hide malicious content, display fake information, or deceive the user into taking harmful actions

The vulnerability is particularly dangerous in scenarios involving recursive clones from untrusted sources, where submodule URLs could point to attacker-controlled servers.

A proof-of-concept exploit is publicly available. Exploitation involves crafting sideband messages with ANSI escape sequences that can overwrite terminal content, hide warnings, or display misleading information to users. Technical details are available in the GitHub Security Advisory.

Detection Methods for CVE-2024-52005

Indicators of Compromise

  • Unexpected terminal behavior during Git clone, fetch, or push operations
  • Terminal output that appears manipulated, cleared, or contains unusual formatting
  • Git operations connecting to unfamiliar or suspicious remote URLs
  • Submodule configurations pointing to untrusted external repositories

Detection Strategies

  • Monitor Git command execution for connections to unexpected or untrusted remote servers
  • Implement network monitoring to detect Git protocol communications to suspicious IP addresses
  • Review .gitmodules files in repositories for potentially malicious submodule URLs
  • Use endpoint detection to flag unusual terminal escape sequences in process output

Monitoring Recommendations

  • Enable logging for all Git operations in development environments
  • Monitor for recursive clone operations from external sources
  • Track Git configuration changes, particularly remote URL modifications
  • Implement alerting for Git operations involving unknown or recently registered domains

How to Mitigate CVE-2024-52005

Immediate Actions Required

  • Update Git to the latest patched version immediately
  • Audit existing repositories for submodules pointing to untrusted sources
  • Educate developers about the risks of cloning from untrusted repositories
  • Consider restricting Git operations to approved repository sources in enterprise environments

Patch Information

A security patch has been developed and discussed on the public Git mailing list. Users should update Git to the latest available version that includes the fix. Refer to the GitHub Security Advisory for specific version information and patch details.

Additional technical discussion is available on the Kernel Mailing List.

Workarounds

  • Avoid recursive clones (--recursive or --recurse-submodules) unless the source repository is fully trusted
  • Manually inspect .gitmodules files before initializing submodules
  • Use terminal emulators with ANSI escape sequence filtering capabilities when performing Git operations
  • Consider using Git in non-interactive modes or redirecting output when working with untrusted sources
bash
# Safe cloning practice - avoid recursive clone for untrusted sources
git clone --no-recurse-submodules <repository-url>

# Inspect submodules before initializing
cat .gitmodules
git submodule status

# Only initialize after verifying submodule URLs are trusted
git submodule update --init

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechGit

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.08%

  • Known ExploitedYes
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/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
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-116
  • Technical References
  • Kernel Mailing List Discussion
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-32631: Git for Windows NTLM Hash Disclosure Flaw

  • CVE-2026-4496: Git-MCP-Server RCE Vulnerability

  • CVE-2025-66413: Git for Windows NTLM Hash Disclosure Flaw

  • CVE-2024-32004: Git-scm Git RCE Vulnerability
Default Legacy - Prefooter | 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