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-2026-34726

CVE-2026-34726: Copier Path Traversal Vulnerability

CVE-2026-34726 is a path traversal flaw in Copier that allows templates to escape their directory and render files from parent directories. This article covers technical details, affected versions, impact, and mitigation.

Published: April 2, 2026

CVE-2026-34726 Overview

CVE-2026-34726 is a path traversal vulnerability discovered in Copier, a popular library and CLI application used for rendering project templates. The vulnerability exists in Copier's _subdirectory setting implementation, which is documented to specify the subdirectory to use as the template root. However, versions prior to 9.14.1 accept parent-directory traversal sequences (such as ..) and use them directly when selecting the template root, allowing a malicious template to escape its own directory and render files from the parent directory without requiring the --UNSAFE flag.

Critical Impact

A malicious template can bypass intended directory restrictions and access files outside the template root, potentially exposing sensitive information or enabling template injection attacks without user awareness.

Affected Products

  • Copier versions prior to 9.14.1
  • Copier library (Python package)
  • Copier CLI application

Discovery Timeline

  • 2026-04-02 - CVE CVE-2026-34726 published to NVD
  • 2026-04-02 - Last updated in NVD database

Technical Details for CVE-2026-34726

Vulnerability Analysis

This path traversal vulnerability (CWE-22) exists in the template root selection logic within Copier's core functionality. The _subdirectory configuration option is designed to allow template authors to specify a subdirectory within the template repository as the root for rendering. However, the implementation failed to validate that the resulting path remained within the template's boundaries.

The vulnerability allows an attacker who controls a template (such as through a supply chain attack or malicious template repository) to craft a _subdirectory value containing parent directory traversal sequences like ../ or ... When a user renders such a template, Copier would follow these traversal paths and potentially render files from directories outside the intended template root, bypassing the safety mechanisms that typically require the --UNSAFE flag for risky operations.

Root Cause

The root cause lies in the _get_template_root method within copier/_main.py. The original implementation directly concatenated the template's local absolute path with the rendered subdirectory value without validating that the resulting path remained within the template's boundaries. The code simply returned self.template.local_abspath / subdir without checking for path traversal attempts.

Attack Vector

An attacker could exploit this vulnerability by creating a malicious template with a crafted _subdirectory setting containing parent-directory traversal sequences. When an unsuspecting user clones and renders this template using Copier, the tool would traverse outside the template directory and potentially:

  1. Render sensitive configuration files from parent directories
  2. Access files outside the template root that were never intended to be processed
  3. Bypass security controls that would normally require --UNSAFE flag

The attack requires local access as the user must invoke Copier with a malicious template, and user interaction is needed to execute the template rendering process.

python
# Security patch - fix: disallow `_subdirectory` path outside template root
# Before (vulnerable):
#   return self.template.local_abspath / subdir
# 
# After (fixed):
         It points to the cloned template local abspath + the rendered subdir, if any.
         """
         subdir = self._render_string(self.template.subdirectory) or ""
-        return self.template.local_abspath / subdir
+        path = (self.template.local_abspath / subdir).resolve()
+        if not path.is_relative_to(self.template.local_abspath):
+            raise ForbiddenPathError(path=Path(subdir))
+        return path

     # Main operations
     @as_operation("copy")

Source: GitHub Commit cb80a3f

Detection Methods for CVE-2026-34726

Indicators of Compromise

  • Templates with _subdirectory values containing .. or other parent-directory traversal sequences
  • Copier execution logs showing access to files outside the expected template directory
  • Unexpected file operations in parent directories during template rendering

Detection Strategies

  • Audit template repositories for _subdirectory settings containing path traversal patterns
  • Monitor Copier invocations and log file access patterns during template rendering
  • Implement file integrity monitoring on directories adjacent to template workspaces
  • Review installed Copier version using pip show copier to identify vulnerable installations

Monitoring Recommendations

  • Enable verbose logging when using Copier to track file access patterns
  • Implement alerting for Copier processes accessing files outside expected template directories
  • Scan template sources for suspicious _subdirectory configurations before use
  • Monitor Python package installations for Copier versions below 9.14.1

How to Mitigate CVE-2026-34726

Immediate Actions Required

  • Upgrade Copier to version 9.14.1 or later immediately
  • Audit any templates used in your environment for malicious _subdirectory settings
  • Review recently rendered templates for signs of path traversal exploitation
  • Validate template sources and only use templates from trusted repositories

Patch Information

The vulnerability has been patched in Copier version 9.14.1. The fix adds path resolution and validation to ensure the computed template root path remains within the template's local absolute path. If the resolved path escapes the template boundaries, a ForbiddenPathError is now raised. Users should upgrade using:

bash
pip install --upgrade copier>=9.14.1

For additional details, see the GitHub Security Advisory GHSA-85v3-4m8g-hrh6 and Release v9.14.1.

Workarounds

  • Use the --UNSAFE flag awareness to carefully review all template operations before execution
  • Manually inspect template copier.yml or copier.yaml files for suspicious _subdirectory values before rendering
  • Run Copier in isolated environments such as containers to limit potential exposure
  • Clone and review template repositories locally before use to identify path traversal attempts
bash
# Verify Copier version and upgrade if necessary
pip show copier | grep Version
pip install --upgrade "copier>=9.14.1"

# Inspect template configuration before use
cat /path/to/template/copier.yml | grep "_subdirectory"

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechCopier

  • SeverityMEDIUM

  • CVSS Score4.4

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

  • GitHub Release v9.14.1

  • GitHub Security Advisory GHSA-85v3-4m8g-hrh6
  • Related CVEs
  • CVE-2026-34730: Copier Path Traversal Vulnerability

  • CVE-2026-23986: Copier Path Traversal Vulnerability

  • CVE-2026-23968: Copier Path Traversal 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