CVE-2025-55214 Details
Description
Copier library and CLI app for rendering project templates. From 7.1.0 to before 9.9.1, Copier suggests that it's safe to generate a project from a safe template, i.e. one that doesn't use unsafe features like custom Jinja extensions which would require passing the --UNSAFE,--trust flag. As it turns out, a safe template can currently write files outside the destination path where a project shall be generated or updated. This is possible when rendering a generated directory structure whose rendered path is either a relative parent path or an absolute path. Constructing such paths is possible using Copier's builtin pathjoin Jinja filter and its builtin _copier_conf.sep variable, which is the platform-native path separator. This way, a malicious template author can create a template that overwrites arbitrary files (according to the user's write permissions), e.g., to cause havoc. This vulnerability is fixed in 9.9.1.
A vulnerability exists in the Copier library and CLI application, specifically in versions 7.1.0 prior to 9.9.1. The issue arises because Copier incorrectly suggests that it is safe to generate projects from templates deemed 'safe', meaning those that do not utilize unsafe features like custom Jinja extensions requiring the '--UNSAFE,--trust' flag. However, it has been discovered that a safe template can write files outside the designated project generation or update path. This vulnerability is exploitable when the template creates a directory structure that includes relative parent paths or absolute paths, using Copier's built-in 'pathjoin' Jinja filter and the '_copier_conf.sep' variable, which represents the platform-specific path separator. As a result, a malicious template author could craft a template that overwrites arbitrary files based on the user's write permissions, potentially leading to disruptive consequences.
Users can update to Copier version 9.9.1 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 18, 2025CISA-ADP
Assessed Aug 18, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/copier-org/copier/commit/fdbc0167cc22780b497e4db176feaf6f024757d6 | [email protected] | Source CodeVendor |
| https://github.com/copier-org/copier/security/advisories/GHSA-p7q8-grrj-3m8w | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| copier | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 18, 2025 | New CVE Received | [email protected] |
Volerion