CVE-2026-23986
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2026-01-21

Last updated on: 2026-02-02

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-01-21
Last Modified
2026-02-02
Generated
2026-05-07
AI Q&A
2026-01-22
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
copier-org copier to 9.11.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-61 The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Copier library and CLI app for rendering project templates. Before version 9.11.2, Copier incorrectly considers certain templates safe if they do not use unsafe features like custom Jinja extensions. However, a so-called safe template can exploit a combination of directory symlinks with the _preserve_symlinks: true setting and a crafted directory structure to write files outside the intended destination path. This allows a malicious template author to overwrite arbitrary files on the user's system, limited only by the user's write permissions. Version 9.11.2 fixes this issue.


How can this vulnerability impact me? :

This vulnerability can allow a malicious template to overwrite arbitrary files on your system outside the intended project directory. This could lead to data loss, corruption, or unauthorized modification of files, potentially causing system instability or security breaches depending on which files are overwritten. The impact depends on the user's write permissions, so if the user has high privileges, the damage could be significant.


What immediate steps should I take to mitigate this vulnerability?

Upgrade Copier to version 9.11.2 or later, as this version patches the vulnerability. Avoid generating projects from templates that use unsafe features or require the --UNSAFE or --trust flags unless you fully trust the template source. Additionally, be cautious of templates that use symlinks with _preserve_symlinks: true to prevent arbitrary file overwrites.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart