CVE-2026-23986
Copier safe template has arbitrary filesystem write access via directory symlinks when _preserve_symlinks: true
Description
Copier is a library and CLI app for rendering project templates. Prior to version 9.11.2, 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 to arbitrary directories outside the destination path by using directory a symlink along with `_preserve_symlinks: true` and a generated directory structure whose rendered path is inside the symlinked directory. 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. Version 9.11.2 patches the issue.
INFO
Published Date :
Jan. 21, 2026, 11:15 p.m.
Last Modified :
Feb. 2, 2026, 2:10 p.m.
Remotely Exploit :
No
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | [email protected] | ||||
| CVSS 4.0 | MEDIUM | [email protected] |
Solution
- Update Copier to version 9.11.2 or later.
- Verify template generation security settings.
- Avoid using unsafe flags with templates.
- Review template source code carefully.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-23986.
| URL | Resource |
|---|---|
| https://github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6 | Patch |
| https://github.com/copier-org/copier/releases/tag/v9.11.2 | Product Release Notes |
| https://github.com/copier-org/copier/security/advisories/GHSA-4fqp-r85r-hxqh | Exploit Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-23986 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-23986
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-23986 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-23986 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Feb. 02, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H Added CPE Configuration OR *cpe:2.3:a:copier-org:copier:*:*:*:*:*:python:*:* versions up to (excluding) 9.11.2 Added Reference Type GitHub, Inc.: https://github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6 Types: Patch Added Reference Type GitHub, Inc.: https://github.com/copier-org/copier/releases/tag/v9.11.2 Types: Product, Release Notes Added Reference Type GitHub, Inc.: https://github.com/copier-org/copier/security/advisories/GHSA-4fqp-r85r-hxqh Types: Exploit, Third Party Advisory -
New CVE Received by [email protected]
Jan. 21, 2026
Action Type Old Value New Value Added Description Copier is a library and CLI app for rendering project templates. Prior to version 9.11.2, 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 to arbitrary directories outside the destination path by using directory a symlink along with `_preserve_symlinks: true` and a generated directory structure whose rendered path is inside the symlinked directory. 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. Version 9.11.2 patches the issue. Added CVSS V4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-61 Added Reference https://github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6 Added Reference https://github.com/copier-org/copier/releases/tag/v9.11.2 Added Reference https://github.com/copier-org/copier/security/advisories/GHSA-4fqp-r85r-hxqh