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-2023-25815

CVE-2023-25815: Git for Windows Privilege Escalation Flaw

CVE-2023-25815 is a privilege escalation vulnerability in Git for Windows that allows low-privilege users to inject fake localized messages. This article covers the technical details, affected versions, and mitigation steps.

Published: February 11, 2026

CVE-2023-25815 Overview

CVE-2023-25815 is a Path Traversal and Format String vulnerability affecting Git for Windows that allows low-privilege users to inject fake localized messages into Git operations. The vulnerability stems from a change in MINGW-packages that caused the gettext() function to use a hardcoded path (C:\mingw64\share\locale) instead of the runtime prefix for localized message lookup. Since Git for Windows doesn't ship localized messages and any authenticated user can create folders in C:\, attackers can plant malicious message files that Git will display to users.

Critical Impact

Low-privilege users can place spoofed Git messages that appear legitimate, potentially deceiving users into visiting malicious websites or executing harmful actions through social engineering.

Affected Products

  • Git for Windows (versions prior to 2.40.1)
  • Fedora 37
  • Fedora 38

Discovery Timeline

  • April 25, 2023 - CVE-2023-25815 published to NVD
  • November 4, 2025 - Last updated in NVD database

Technical Details for CVE-2023-25815

Vulnerability Analysis

This vulnerability exploits a change in how Git for Windows handles localized messages. Although Git for Windows doesn't ship localized messages with its installer, the underlying gettext() function still attempts to load them from a predictable filesystem location. The root issue involves two weaknesses classified under CWE-22 (Path Traversal) and CWE-134 (Format String Vulnerability).

The attack requires local access to the Windows system and relies heavily on social engineering to be effective. An attacker would need to create the C:\mingw64\share\locale directory structure and place crafted message files there. When a user runs Git commands, these fake messages would be displayed as if they were legitimate Git output, potentially instructing users to perform dangerous actions.

Root Cause

The vulnerability originated from a change in the MSYS2 MINGW-packages (documented in the MSYS2 MINGW-packages Pull Request) that modified how gettext() initializes. Instead of using a runtime-determined prefix to locate translation files, the function began using a hardcoded path C:\mingw64\share\locale. This path typically doesn't exist on most Windows systems, but crucially, any authenticated user has permission to create folders directly under C:\. This combination of factors—a predictable hardcoded path and permissive folder creation rights—creates the opportunity for message injection.

Attack Vector

The attack requires local access to the target system and involves the following steps:

  1. The attacker creates the directory structure C:\mingw64\share\locale\[language_code]\LC_MESSAGES\
  2. The attacker places a malicious .mo (compiled gettext message) file containing spoofed Git messages
  3. When a legitimate user runs Git commands, the fake messages are displayed
  4. The spoofed messages could instruct users to visit malicious websites or perform dangerous actions

This vulnerability requires significant social engineering to exploit effectively. For example, a fake message displayed after a git clone operation could direct users to a phishing site disguised as a legitimate Git-related resource. The local access requirement limits the attack surface, making this primarily a concern in shared computing environments.

Detection Methods for CVE-2023-25815

Indicators of Compromise

  • Presence of the C:\mingw64\share\locale directory structure on systems where MSYS2/MINGW64 is not intentionally installed
  • Unexpected .mo or .po files in locale directories under C:\mingw64\
  • Git command output containing unusual messages, URLs, or instructions not typically displayed by Git

Detection Strategies

  • Monitor file system activity for creation of the C:\mingw64 directory path on Windows systems
  • Implement file integrity monitoring for unexpected locale files appearing in system paths
  • Review Git command output logs for anomalous messages or unexpected URLs

Monitoring Recommendations

  • Deploy endpoint detection rules to alert on folder creation under C:\mingw64\ by non-administrative users
  • Utilize SentinelOne's behavioral detection capabilities to identify suspicious directory creation patterns
  • Enable audit logging for folder creation events in the C:\ root directory

How to Mitigate CVE-2023-25815

Immediate Actions Required

  • Update Git for Windows to version 2.40.1 or later immediately
  • Audit Windows systems for the existence of C:\mingw64\share\locale directories
  • Remove any suspicious locale files found in unexpected locations
  • Review system access permissions on shared workstations

Patch Information

Git for Windows version 2.40.1 contains the official patch for this vulnerability. The fix ensures that the gettext initialization properly uses the runtime prefix rather than the hardcoded path. Users should upgrade through the official Git for Windows Release v2.40.1. For Linux distributions, refer to the respective security advisories from Fedora Package Announcements, Gentoo GLSA 202312-15, and Debian LTS Announcement.

Workarounds

  • Avoid using Windows machines with shared accounts where multiple users have local access
  • Proactively create an empty C:\mingw64 folder to prevent attackers from creating the malicious directory structure
  • For administrators: Remove the permission to create folders directly in C:\ for non-administrative users
  • Consider implementing application whitelisting to prevent execution from unexpected locale paths
bash
# Create empty protective directory (run as administrator)
mkdir C:\mingw64
icacls C:\mingw64 /deny "Users:(WD)"

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechGit For Windows

  • SeverityLOW

  • CVSS Score2.2

  • EPSS Probability0.09%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-22

  • CWE-134
  • Technical References
  • Openwall OSS Security Update

  • AxeChiron Exploit Guide

  • Git for Windows Release v2.40.1

  • Debian LTS Announcement June 2024

  • Fedora Package Announcement - Message 1

  • Fedora Package Announcement - Message 2

  • Fedora Package Announcement - Message 3

  • Open Group printf Function Documentation

  • Gentoo GLSA 202312-15

  • Debian LTS Announcement September 2024
  • Vendor Resources
  • GitHub Security Advisory GHSA-9w66-8mq8-5vm8

  • MSYS2 MINGW-packages Pull Request
  • Related CVEs
  • CVE-2023-23618: Git for Windows RCE 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