CVE-2026-34726
MediumCVSS 4.4Exploitation Probability (EPSS)
Low risk31th percentile - higher than 31% of all known CVEs
Summary
Copier before version 9.14.1 accepts parent-directory traversal (..) in the _subdirectory setting, allowing a template to escape its own directory and render files from the parent directory without the --UNSAFE flag.
Risk Assessment
An attacker can use a malicious template to read sensitive files outside the template directory, potentially leading to data disclosure.
Recommendation
Upgrade Copier to version 9.14.1 or later.
Other vulnerabilities in Copier
See all- CVE-2026-62999High
Copier versions 9.5.0 through 9.16.0 contain a vulnerability that allows bypassing the trusted repository prefix. Percent-encoded path segments or separators in a template URL can match a configured trusted prefix before decoding by the HTTP server or Git transport, enabling unsafe template features from a repository outside the trusted prefix after user interaction.
- CVE-2026-53951High
A vulnerability in the Copier library (versions 9.5.0 through 9.15.1) allows bypassing the trust mechanism for templates. The prefix check uses raw `str.startswith` without path normalization, while template fetching normalizes the path, enabling `..` sequences to point to a different, attacker-controlled template. Consequently, code from `tasks`, `migrations`, or `jinja_extensions` executes without a trust prompt.
- CVE-2026-34730Medium
Copier before version 9.14.1 has a vulnerability in the _external_data feature that allows a template to load YAML files from template-controlled paths. A malicious template can read local YAML-parseable files accessible to the user and expose their contents in rendered output.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

