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

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-21T22:19:29.000Z
- Modified: 2026-07-07T17:56:39.975Z
- Also known as: GHSA-4fqp-r85r-hxqh, PYSEC-2026-1272
- Weaknesses: CWE-61
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- copier-org copier: < 9.11.2; before 9.11.2
- copier (PyPI): before 9.11.2

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `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`
- GitHub: CVSS:3.1 7.1 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/copier-org/copier/security/advisories/GHSA-4fqp-r85r-hxqh> (exploit, third-party-advisory, web)
- <https://github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6> (patch, web)
- <https://github.com/copier-org/copier/releases/tag/v9.11.2> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-23986> (advisory)
- <https://github.com/copier-org/copier> (package)
- <https://pypi.org/project/copier> (package)
- <https://github.com/advisories/GHSA-4fqp-r85r-hxqh> (advisory)

## Sources

- CVE List: [CVE-2026-23986](https://www.cve.org/CVERecord?id=CVE-2026-23986), CVE Terms of Use, modified 2026-01-22
- GitHub Advisory Database: [GHSA-4fqp-r85r-hxqh](https://github.com/advisories/GHSA-4fqp-r85r-hxqh), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2026-23986](https://nvd.nist.gov/vuln/detail/CVE-2026-23986), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1272](https://osv.dev/vulnerability/PYSEC-2026-1272), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2026-23986 · Whole record: https://cve.day/CVE-2026-23986.json · Rebuilt by cve.day 2026-11-25T22:59:13.030Z
