<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Copier (&gt;= 9.5.0, &lt;= 9.15.1) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/copier--9.5.0--9.15.1/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 19 Aug 2026 22:34:28 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/copier--9.5.0--9.15.1/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Copier Trust-Prefix Bypass via Path Traversal</title><link>https://feed.craftedsignal.io/briefs/2026-08-copier-trust-bypass/</link><pubDate>Wed, 19 Aug 2026 22:34:28 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-copier-trust-bypass/</guid><description>Copier versions 9.5.0 through 9.15.1 contain an authorization bypass vulnerability in the 'trust' configuration where insufficient path normalization allows attackers to execute arbitrary tasks by traversing out of trusted template prefixes.</description><content:encoded><![CDATA[<p>Copier versions 9.5.0 through 9.15.1 contain an authorization bypass vulnerability in the 'trust' configuration logic. When users define a 'trust' setting with a trailing slash, Copier interprets this as a trusted prefix. However, the application uses a raw 'str.startswith' check in 'copier/_settings.py' against the template URL without performing path normalization.</p>
<p>Because the underlying mechanisms used to fetch the template (such as git or pathlib) normalize the URL and resolve dot-segments, an attacker can craft a template reference that textually begins with a trusted prefix but includes '..' to escape into an attacker-controlled directory or repository. This causes Copier to grant trust to a malicious template that it should have rejected. Consequently, the 'unsafe-feature' gate is bypassed, and the malicious template's 'tasks', 'migrations', or 'jinja_extensions' are executed without the required user prompt, leading to arbitrary command execution on the victim's machine. This is particularly dangerous during 'copier update' operations where the template source can be influenced by the project configuration.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The victim configures a trusted template prefix in the Copier settings (e.g., '/trusted/').</li>
<li>The attacker modifies a '.copier-answers.yml' file within a project or convinces the victim to update a project referencing a malicious template.</li>
<li>The attacker provides a template URL that starts with the trusted prefix but contains path traversal segments (e.g., '/trusted/../attacker/repo').</li>
<li>Copier's 'is_trusted_repository' function performs a raw string comparison, sees the trusted prefix, and grants trust.</li>
<li>Copier passes the URL to the underlying fetching mechanism (git or filesystem operations), which resolves the path to the attacker-controlled location.</li>
<li>Copier skips the 'unsafe-feature' check because it incorrectly believes the source is trusted.</li>
<li>Copier executes the tasks, migrations, or jinja_extensions defined in the malicious template.</li>
<li>Arbitrary commands execute on the victim's host with the privileges of the user running the Copier process.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for remote code execution on the user's workstation. This affects developers and automated systems utilizing Copier to manage project templates. If a user performs a 'copier update' on a compromised project, the attacker gains the ability to run arbitrary system commands, potentially leading to full account compromise or lateral movement within the developer's environment.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of Copier immediately (&gt;= 9.15.2).</li>
<li>Avoid configuring wide directory prefixes in the 'trust' setting if possible, and verify the integrity of all template sources.</li>
<li>Audit project configuration files (specifically '.copier-answers.yml') for template URLs containing unusual path segments like '..' or attempts to escape defined trusted paths.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>vulnerability</category><category>rce</category><category>supply-chain</category></item></channel></rss>