A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-2026-45571

CVE-2026-45571: go-git Path Traversal Vulnerability

CVE-2026-45571 is a path traversal vulnerability in go-git that allows attackers to modify files outside intended directories via crafted repository data. This article covers technical details, affected versions, and patches.

Published: May 28, 2026

CVE-2026-45571 Overview

CVE-2026-45571 is a path traversal vulnerability [CWE-22] in go-git, an extensible Git implementation library written in pure Go. Versions prior to 5.19.1 and 6.0.0-alpha.4 fail to enforce path validation checks that upstream Git introduced years ago. Crafted repository data can affect files outside the intended checkout target, including the repository's .git directory. An attacker who can convince a user to clone or check out a malicious repository can write files to unintended locations. The maintainers fixed the issue in versions 5.19.1 and 6.0.0-alpha.4.

Critical Impact

Crafted Git repository data can write files outside the checkout directory, including into .git, enabling integrity and availability impact on systems using vulnerable go-git versions.

Affected Products

  • go-git versions prior to 5.19.1
  • go-git6.0.0-alpha releases prior to 6.0.0-alpha.4
  • Go applications and tooling that embed vulnerable go-git releases

Discovery Timeline

  • 2026-05-27 - CVE-2026-45571 published to NVD
  • 2026-05-27 - Last updated in NVD database

Technical Details for CVE-2026-45571

Vulnerability Analysis

The vulnerability stems from missing path validation during checkout operations in go-git. Upstream Git enforces checks that reject tree entries containing path components that escape the working directory or target the .git metadata directory. Over time, go-git drifted from these checks and stopped rejecting equivalent malicious entries.

A crafted repository can include tree entries with path components such as .., absolute paths, or names that resolve to .git. When a vulnerable consumer of go-git checks out such a repository, the library writes the entry contents to the attacker-chosen location. Writing into .git allows an attacker to alter hooks, configuration, or refs, which can chain into code execution the next time Git operations run.

The attack requires user interaction, since a victim must clone, fetch, or check out the malicious repository. Confidentiality is not directly impacted, but integrity and availability are affected because attacker-controlled bytes land in files the user did not intend to modify.

Root Cause

The checkout logic in go-git did not validate tree entry path components against the constraints enforced by reference Git. Specifically, the library accepted entries whose normalized paths escaped the checkout root or targeted the .git directory, rather than rejecting them before any write occurred.

Attack Vector

An attacker publishes or serves a malicious Git repository. A victim using a Go application built on a vulnerable go-git version clones or checks out that repository. During checkout, the library writes blob contents to the attacker-specified path. The vector is network-reachable and requires user interaction, consistent with the CVSS vector recorded in NVD.

No verified public proof-of-concept code is referenced in the advisory. Technical details are available in the GitHub Security Advisory GHSA-crhj-59gh-8x96.

Detection Methods for CVE-2026-45571

Indicators of Compromise

  • Unexpected modifications to files inside a repository's .git directory, especially config, hooks/, or HEAD after a clone or checkout
  • File writes outside the intended checkout directory immediately following a go-git clone, fetch, or checkout operation
  • Repository tree entries containing path components such as .., absolute paths, or names that normalize to .git

Detection Strategies

  • Inventory Go binaries and services that import github.com/go-git/go-git and compare resolved module versions against 5.19.1 and 6.0.0-alpha.4
  • Use software composition analysis (SCA) to flag vulnerable go-git versions in build artifacts and container images
  • Audit logs from CI/CD systems and developer endpoints that perform automated cloning of untrusted repositories

Monitoring Recommendations

  • Monitor process and file telemetry for write operations targeting paths outside declared workspace directories from processes that embed go-git
  • Alert on modifications to .git/hooks/ and .git/config outside of expected developer workflows
  • Track Git operations against untrusted remotes from automated systems, including build runners and indexing services

How to Mitigate CVE-2026-45571

Immediate Actions Required

  • Upgrade go-git to 5.19.1 or 6.0.0-alpha.4 in all dependent applications and rebuild affected binaries
  • Identify services that process untrusted repositories with go-git and prioritize them for patching
  • Restrict automated checkout of untrusted repositories until patched versions are deployed

Patch Information

The go-git maintainers fixed the path validation gap in versions 5.19.1 and 6.0.0-alpha.4. Update go.mod to require a fixed release and run go mod tidy followed by a clean rebuild. Refer to the GitHub Security Advisory GHSA-crhj-59gh-8x96 for the full advisory text and commit references.

Workarounds

  • Perform go-git checkout operations inside isolated, ephemeral working directories with no sensitive files in parent paths
  • Validate repository tree entries before checkout and reject paths containing .., absolute components, or .git segments
  • Run repository processing in sandboxed containers with minimal filesystem permissions to limit the blast radius of an out-of-bounds write
bash
# Update go-git to a fixed release
go get github.com/go-git/go-git/v5@v5.19.1
go mod tidy
go build ./...

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGo Git

  • SeverityMEDIUM

  • CVSS Score5.4

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityLow
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2023-49569: Go-git Path Traversal Vulnerability

  • CVE-2026-45570: go-git SSH Transport RCE Vulnerability

  • CVE-2026-45022: go-git Information Disclosure Flaw

  • CVE-2026-41506: Go-git Information Disclosure Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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