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

CVE-2023-23946: Git Path Traversal Vulnerability

CVE-2023-23946 is a path traversal vulnerability in Git-scm Git that allows attackers to overwrite files outside the working tree via git apply. This article covers technical details, affected versions, and mitigation.

Published: February 11, 2026

CVE-2023-23946 Overview

CVE-2023-23946 is a path traversal vulnerability in Git, the widely-used distributed revision control system. This vulnerability allows an attacker to craft malicious input that, when processed by the git apply command, can overwrite files outside the intended working tree. The vulnerability exploits improper path validation when applying patches, potentially enabling arbitrary file writes with the privileges of the user executing the command.

Critical Impact

Attackers can craft malicious patches to overwrite arbitrary files outside the Git working directory, potentially leading to code execution, configuration tampering, or system compromise when users apply untrusted patches.

Affected Products

  • Git versions prior to 2.39.2
  • Git versions prior to 2.38.4, 2.37.6, 2.36.5, 2.35.7
  • Git versions prior to 2.34.7, 2.33.7, 2.32.6, 2.31.7, 2.30.8

Discovery Timeline

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

Technical Details for CVE-2023-23946

Vulnerability Analysis

This path traversal vulnerability (CWE-22) exists in Git's patch application mechanism. The git apply command is designed to apply patches to files within a Git repository's working tree. However, prior to the patched versions, insufficient validation of symbolic links within crafted patches allowed attackers to escape the working tree boundary.

The attack leverages a two-stage approach: first, a malicious patch creates a symbolic link pointing to a directory outside the working tree, then a subsequent patch operation writes files through this symbolic link. This effectively bypasses the intended path containment, allowing file writes to arbitrary locations accessible by the user running git apply.

The vulnerability is particularly concerning in automated CI/CD pipelines, code review systems, and any workflow where patches from untrusted sources are automatically applied. Since the attack requires only network-level access to deliver a crafted patch file, it represents a significant risk for development environments.

Root Cause

The root cause is improper input validation in Git's patch application logic. Specifically, Git failed to adequately verify that files created or modified by a patch operation would remain within the working tree after symbolic link resolution. The patch validation did not account for the scenario where a symbolic link created by the patch itself could redirect subsequent file operations outside the repository boundaries.

Attack Vector

The attack requires an attacker to craft a malicious patch file that:

  1. Creates a symbolic link within the working tree pointing to a target directory outside the repository
  2. Includes subsequent hunks that write files through the newly created symbolic link

When a user applies this patch using git apply, the files are written to the attacker-controlled location. This can be exploited to overwrite critical configuration files, inject malicious code into trusted locations, or modify system binaries if the user has sufficient privileges.

text
+Git v2.30.8 Release Notes
+=========================
+
+This release addresses the security issues CVE-2023-22490 and
+CVE-2023-23946.
+
+
+Fixes since v2.30.7
+-------------------
+
+ * CVE-2023-22490:
+
+   Using a specially-crafted repository, Git can be tricked into using
+   its local clone optimization even when using a non-local transport.
+   Though Git will abort local clones whose source $GIT_DIR/objects
+   directory contains symbolic links (c.f., CVE-2022-39253), the objects
+   directory itself may still be a symbolic link.
+
+   These two may be combined to include arbitrary files based on known
+   paths on the victim's filesystem within the malicious repository's
+   working copy, allowing for data exfiltration in a similar manner as
+   CVE-2022-39253.
+
+ * CVE-2023-23946:
+
+   By feeding a crafted input to "git apply", a path outside the
+   working tree can be overwritten as the user who is running "git
+   apply".
+
+ * A mismatched type in `attr.c::read_attr_from_index()` which could

Source: GitHub Commit

Detection Methods for CVE-2023-23946

Indicators of Compromise

  • Unexpected symbolic links created within Git repositories pointing to directories outside the working tree
  • Unusual file modifications in system directories or configuration files following git apply operations
  • Patch files containing symbolic link creation followed by file writes to paths through that symlink
  • Audit logs showing git apply commands processing patches from untrusted or external sources

Detection Strategies

  • Monitor git apply command executions, especially those processing patches from external sources or email attachments
  • Implement file integrity monitoring on critical system directories to detect unauthorized modifications
  • Review Git hooks and automation scripts for unsanitized patch application workflows
  • Scan incoming patch files for suspicious patterns including symbolic link creation followed by path traversal sequences

Monitoring Recommendations

  • Enable audit logging for Git operations in CI/CD environments and development workstations
  • Configure SentinelOne to monitor for suspicious file system operations originating from Git processes
  • Implement alerting for git apply operations that result in file writes outside repository directories
  • Establish baseline behavior for Git operations to detect anomalous patch application patterns

How to Mitigate CVE-2023-23946

Immediate Actions Required

  • Upgrade Git to version 2.39.2, 2.38.4, 2.37.6, 2.36.5, 2.35.7, 2.34.7, 2.33.7, 2.32.6, 2.31.7, or 2.30.8 depending on your release branch
  • Audit all systems for Git installations and prioritize patching development servers and CI/CD infrastructure
  • Review recent patch application history to identify any potentially malicious patches that may have been applied
  • Restrict git apply usage to trusted patch sources until patching is complete

Patch Information

Security fixes have been released across multiple Git version branches. The patch addresses the symbolic link handling in git apply to prevent path traversal outside the working tree. The fix is available in the following versions: v2.39.2, v2.38.4, v2.37.6, v2.36.5, v2.35.7, v2.34.7, v2.33.7, v2.32.6, v2.31.7, and v2.30.8. For implementation details, see the GitHub Security Advisory and the commit fix.

Workarounds

  • Use git apply --stat to inspect patches before applying to identify suspicious symbolic link creation
  • Avoid applying patches that create symbolic links followed by file writes beyond those links
  • Implement pre-apply patch validation in automated workflows to reject patches with symbolic link patterns
  • Run git apply operations in sandboxed or containerized environments with restricted file system access
bash
# Inspect a patch before applying to check for symbolic links
git apply --stat suspicious.patch

# Check patch for symbolic link mode (120000)
grep -E "^new file mode 120000" suspicious.patch

# Apply with verbose output to monitor operations
git apply --verbose --check patch.diff

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGit

  • SeverityHIGH

  • CVSS Score7.5

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • Gentoo GLSA 202312-15
  • Vendor Resources
  • GitHub Commit Change

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2024-32465: Git-scm Git Path Traversal Vulnerability

  • CVE-2025-46835: Git GUI Path Traversal Vulnerability

  • CVE-2023-25652: Git Path Traversal Vulnerability

  • CVE-2026-32631: Git for Windows NTLM Hash Disclosure Flaw
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