CVE-2026-53951: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in copier-org copier
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.
AI Analysis
Technical Summary
Copier, a project template rendering tool, improperly validates template URLs in versions 9.5.0 to 9.15.1. The 'trust' setting uses a raw string prefix check without path normalization, while the actual template fetching normalizes the path. This discrepancy allows an attacker to craft a template URL that appears trusted but resolves to a different location containing malicious code. This malicious template executes tasks, migrations, or Jinja extensions without triggering the '--trust' prompt, enabling arbitrary command execution. The vulnerability is fixed in version 9.15.2.
Potential Impact
An attacker can bypass the trust prompt and execute arbitrary commands by supplying a specially crafted template URL that exploits the path traversal flaw. This can lead to execution of attacker-controlled code during template rendering, potentially compromising the host system.
Mitigation Recommendations
Upgrade copier to version 9.15.2 or later, where this path traversal vulnerability is patched. No other mitigations are indicated by the vendor advisory.
CVE-2026-53951: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in copier-org copier
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.
CVSS v4.0
Score 8.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Copier, a project template rendering tool, improperly validates template URLs in versions 9.5.0 to 9.15.1. The 'trust' setting uses a raw string prefix check without path normalization, while the actual template fetching normalizes the path. This discrepancy allows an attacker to craft a template URL that appears trusted but resolves to a different location containing malicious code. This malicious template executes tasks, migrations, or Jinja extensions without triggering the '--trust' prompt, enabling arbitrary command execution. The vulnerability is fixed in version 9.15.2.
Potential Impact
An attacker can bypass the trust prompt and execute arbitrary commands by supplying a specially crafted template URL that exploits the path traversal flaw. This can lead to execution of attacker-controlled code during template rendering, potentially compromising the host system.
Mitigation Recommendations
Upgrade copier to version 9.15.2 or later, where this path traversal vulnerability is patched. No other mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-11T15:50:01.281Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4e73c0c9d9e3dbe360428a
Added to database: 07/08/2026, 15:58:56 UTC
Last enriched: 07/18/2026, 12:41:42 UTC
Last updated: 08/22/2026, 22:52:14 UTC
Views: 47
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.