Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-34726: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in copier-org copier

0
Medium
VulnerabilityCVE-2026-34726cvecve-2026-34726cwe-22
Published: Thu Apr 02 2026 (04/02/2026, 18:07:35 UTC)
Source: CVE Database V5
Vendor/Project: copier-org
Product: copier

Description

Copier is a library and CLI app for rendering project templates. Prior to version 9.14.1, Copier's _subdirectory setting is documented as the subdirectory to use as the template root. However, the current implementation accepts parent-directory traversal such as .. and uses it directly when selecting the template root. As a result, a template can escape its own directory and make Copier render files from the parent directory without --UNSAFE. This issue has been patched in version 9.14.1.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/02/2026, 19:36:51 UTC

Technical Analysis

CVE-2026-34726 is a path traversal vulnerability classified under CWE-22 affecting the Copier library and CLI application, which is used for rendering project templates. Prior to version 9.14.1, the _subdirectory setting, which defines the template root directory, did not properly sanitize input paths. Specifically, it accepted parent directory traversal sequences such as '..' without restriction. This flaw allows an attacker to escape the intended template directory and cause Copier to render files from directories above the template root. Notably, this occurs even without the --UNSAFE flag, which is normally required to allow unsafe operations. The vulnerability requires local access and user interaction, as the attacker must provide crafted input to the _subdirectory setting. The CVSS v3.1 score is 4.4 (medium), reflecting limited impact on confidentiality and integrity, no impact on availability, and the need for user interaction and local access. No known exploits are currently reported in the wild. The issue was patched in Copier version 9.14.1 by properly restricting path traversal sequences in the _subdirectory parameter to prevent escaping the template root directory. This vulnerability could be exploited to read or render unintended files, potentially leaking sensitive information or causing incorrect template generation.

Potential Impact

The primary impact of this vulnerability is unauthorized access to files outside the intended template directory, which can lead to information disclosure or manipulation of template rendering outputs. Organizations using Copier for automated project scaffolding or configuration generation may inadvertently expose sensitive files or inject unintended content into generated projects. While the vulnerability does not directly affect availability, it compromises confidentiality and integrity to a limited extent. Since exploitation requires local access and user interaction, the risk is mitigated in environments with strict user controls but remains significant in multi-user or developer environments where malicious or compromised users could exploit this flaw. The vulnerability could also be leveraged as part of a broader attack chain to escalate privileges or move laterally by accessing configuration files or scripts outside the template scope.

Mitigation Recommendations

The most effective mitigation is to upgrade Copier to version 9.14.1 or later, where the vulnerability is patched. Until upgrading is possible, organizations should restrict access to Copier usage to trusted users only and avoid using untrusted or user-supplied input for the _subdirectory setting. Implement strict input validation or sanitization on any parameters controlling template paths to prevent directory traversal sequences. Additionally, monitor and audit Copier usage logs to detect unusual template rendering requests that attempt to access parent directories. Employ file system permissions to limit Copier's read access to only necessary directories, reducing the impact of potential traversal attempts. Educate developers and users about the risks of using unsafe flags or parameters that could exacerbate this vulnerability.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-30T18:41:20.753Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69ceb81be6bfc5ba1df6de90

Added to database: 4/2/2026, 6:40:27 PM

Last enriched: 4/2/2026, 7:36:51 PM

Last updated: 4/3/2026, 5:59:05 AM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses