Copier safe template has arbitrary filesystem write access via directory symlinks when _preserve_symlinks: true
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| copier-org | copier | before 9.11.2 | 9.11.2 | Patch available | CNA |
| — | copier (PyPI) | before 9.11.2 | 9.11.2 | Patch available | GHSA-4fqp-r85r-hxqh |
- copier Vendorcopier-org Affected before 9.11.2 Fixed in 9.11.2 Patch available CNA
- copier (PyPI) Vendor— Affected before 9.11.2 Fixed in 9.11.2 Patch available GHSA-4fqp-r85r-hxqh
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:copier-org:copier:*:*:*:*:*:python:*:* | before 9.11.2 | Vulnerable | copier-org |
- cpe:2.3:a:copier-org:copier:*:*:*:*:*:python:*:* Versions before 9.11.2 Vulnerable ·copier-org
Remediation
- Fix · CNA copier (copier-org) Fixed in 9.11.2
- Fix · GHSA-4fqp-r85r-hxqh copier (PyPI) Fixed in 9.11.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-23986
- 2026-10-03 Alias added: GHSA-4fqp-r85r-hxqh
References
More copier-org Copier vulnerabilities
- TI-2026-26974 Copier `_external_data` allows path traversal and absolute-path local file read without unsafe mode CVSS 3.1MEDIUM 5.5
- TI-2026-26970 Copier `_subdirectory` allows template root escape via parent-directory traversal CVSS 3.1MEDIUM 4.4
- TI-2026-19310 Copier safe template has arbitrary filesystem read access via symlinks when _preserve_symlinks: false CVSS 4.0MEDIUM 6.8
Sources
- CVE-2026-23986 · CVE Program
- CVE-2026-23986 · NVD
- FIRST EPSS
- GHSA-4fqp-r85r-hxqh · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences