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

CVE-2023-23618: Git for Windows RCE Vulnerability

CVE-2023-23618 is a remote code execution flaw in Git for Windows where gitk may inadvertently execute untrusted code from the current directory. This article covers technical details, affected versions, and mitigation strategies.

Published: February 4, 2026

CVE-2023-23618 Overview

Git for Windows is the Windows port of the popular revision control system Git. Prior to Git for Windows version 2.39.2, when gitk is run on Windows, it potentially runs executables from the current directory inadvertently. This Untrusted Search Path vulnerability (CWE-426) can be exploited with social engineering to trick users into running untrusted code when using gitk or Git GUI's "Visualize History" functionality in clones of untrusted repositories.

Critical Impact

Attackers can achieve local code execution by placing malicious executables in a cloned repository, which are then inadvertently executed when victims use gitk or Git GUI's visualization features, potentially leading to full system compromise.

Affected Products

  • Git for Windows versions prior to 2.39.2
  • gitk graphical history viewer component
  • Git GUI's "Visualize History" functionality

Discovery Timeline

  • 2023-02-14 - CVE-2023-23618 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-23618

Vulnerability Analysis

This vulnerability falls under CWE-426 (Untrusted Search Path), a class of vulnerabilities where an application searches for resources in a path that can be controlled by untrusted parties. In the case of Git for Windows, the gitk tool—a Tcl/Tk-based graphical history viewer—inadvertently includes the current working directory in its executable search path when running on Windows systems.

When a user clones a malicious repository and subsequently runs gitk from within that repository directory, the application may execute attacker-controlled binaries placed in the repository instead of legitimate system utilities. This behavior requires user interaction, making social engineering a key component of exploitation. The attack succeeds because Windows includes the current directory in the default search path for executables, and gitk does not implement sufficient path validation.

Root Cause

The root cause lies in how Tcl's exec command handles executable resolution on Windows platforms. Unlike Unix-like systems, Windows includes the current working directory (.) in the default executable search path. When gitk invokes external commands using Tcl's exec function, malicious executables placed in the current directory can be executed instead of legitimate system binaries. The vulnerability stems from insufficient platform-specific path handling in the gitk Tcl script.

Attack Vector

The attack requires local access and user interaction. An attacker creates a malicious Git repository containing specially crafted executable files with names matching common utilities or commands invoked by gitk. The attack chain proceeds as follows:

  1. Attacker creates a repository with malicious executables in the root directory
  2. Victim clones the untrusted repository
  3. Victim navigates into the cloned repository directory
  4. Victim runs gitk or uses Git GUI's "Visualize History" feature
  5. Malicious executable is executed instead of the intended system binary

The following patch adds platform detection functions to enable platform-specific code paths that address this vulnerability:

text
 
 package require Tk
 
+######################################################################
+##
+## Enabling platform-specific code paths
+
+proc is_MacOSX {} {
+	if {[tk windowingsystem] eq {aqua}} {
+		return 1
+	}
+	return 0
+}
+
+proc is_Windows {} {
+	if {$::tcl_platform(platform) eq {windows}} {
+		return 1
+	}
+	return 0
+}
+
+set _iscygwin {}
+proc is_Cygwin {} {
+	global _iscygwin
+	if {$_iscygwin eq {}} {
+		if {[string match "CYGWIN_*" $::tcl_platform(os)]} {
+			set _iscygwin 1
+		} else {
+			set _iscygwin 0
+		}

Source: GitHub Security Patch Commit

Detection Methods for CVE-2023-23618

Indicators of Compromise

  • Presence of unexpected executable files (.exe, .cmd, .bat, .com) in cloned Git repository directories
  • Process execution events showing executables running from within Git repository paths
  • Unusual child processes spawned by gitk or Git GUI applications
  • File system alerts for executable creation in repository working directories

Detection Strategies

  • Monitor process creation events for executables launched from Git repository directories, particularly as child processes of wish.exe or gitk
  • Implement file integrity monitoring to detect new executable files appearing in cloned repositories
  • Deploy endpoint detection rules to identify suspicious executable paths containing .git parent directories
  • Correlate Git clone operations with subsequent executable creation in the same directory tree

Monitoring Recommendations

  • Enable process auditing to capture full command lines and parent-child process relationships for Git-related applications
  • Configure security tools to alert on executable files created in directories containing .git subdirectories
  • Implement application allowlisting to restrict execution from user-writable directories
  • Review and baseline normal gitk and Git GUI process behavior to identify anomalous child process spawning

How to Mitigate CVE-2023-23618

Immediate Actions Required

  • Upgrade Git for Windows to version 2.39.2 or later immediately
  • Audit systems for Git for Windows installations and identify vulnerable versions
  • Warn developers and users about the risks of running gitk in untrusted repository directories
  • Review recently cloned repositories for suspicious executable files

Patch Information

A security patch is available in Git for Windows version 2.39.2. The patch introduces platform detection functions (is_Windows, is_MacOSX, is_Cygwin) that enable platform-specific code paths to properly handle executable search paths on Windows systems.

Patch details:

  • Fixed Version:2.39.2
  • Commit:49a8ec9dac3cec6602f05fed1b3f80a549c8c05c
  • Release:Git for Windows v2.39.2
  • Security Advisory:GHSA-wxwv-49qw-35pm

Workarounds

  • Avoid using gitk or Git GUI's "Visualize History" functionality in clones of untrusted repositories
  • Use command-line git log with formatting options as an alternative to graphical history viewers
  • Inspect repository contents before running any Git visualization tools
  • Consider changing to a different working directory before running gitk to view repository history
bash
# Safe alternative: Use git log instead of gitk
git log --oneline --graph --all

# Or specify absolute paths when running gitk
cd /path/to/safe/directory
gitk /path/to/repository

# Check for suspicious executables in a repository before using gitk
dir /b *.exe *.cmd *.bat *.com 2>nul || echo "No executables found"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechGit For Windows

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-426
  • Technical References
  • GitHub Release v2.39.2

  • Tcl Wiki Exec Documentation
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA
  • Related CVEs
  • CVE-2023-25815: Git for Windows Privilege Escalation Flaw
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