{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","favicon":"https://feed.craftedsignal.io/favicon-32x32.png","feed_url":"https://feed.craftedsignal.io/products/copier--9.5.0--9.15.1/feed.json","home_page_url":"https://feed.craftedsignal.io/","icon":"https://feed.craftedsignal.io/apple-touch-icon.png","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["copier (\u003e= 9.5.0, \u003c= 9.15.1)"],"_cs_severities":["high"],"_cs_tags":["vulnerability","rce","supply-chain"],"_cs_type":"advisory","_cs_vendors":["Copier"],"content_html":"\u003cp\u003eCopier 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.\u003c/p\u003e\n\u003cp\u003eBecause 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.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eThe victim configures a trusted template prefix in the Copier settings (e.g., '/trusted/').\u003c/li\u003e\n\u003cli\u003eThe attacker modifies a '.copier-answers.yml' file within a project or convinces the victim to update a project referencing a malicious template.\u003c/li\u003e\n\u003cli\u003eThe attacker provides a template URL that starts with the trusted prefix but contains path traversal segments (e.g., '/trusted/../attacker/repo').\u003c/li\u003e\n\u003cli\u003eCopier's 'is_trusted_repository' function performs a raw string comparison, sees the trusted prefix, and grants trust.\u003c/li\u003e\n\u003cli\u003eCopier passes the URL to the underlying fetching mechanism (git or filesystem operations), which resolves the path to the attacker-controlled location.\u003c/li\u003e\n\u003cli\u003eCopier skips the 'unsafe-feature' check because it incorrectly believes the source is trusted.\u003c/li\u003e\n\u003cli\u003eCopier executes the tasks, migrations, or jinja_extensions defined in the malicious template.\u003c/li\u003e\n\u003cli\u003eArbitrary commands execute on the victim's host with the privileges of the user running the Copier process.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful 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.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade to a patched version of Copier immediately (\u0026gt;= 9.15.2).\u003c/li\u003e\n\u003cli\u003eAvoid configuring wide directory prefixes in the 'trust' setting if possible, and verify the integrity of all template sources.\u003c/li\u003e\n\u003cli\u003eAudit project configuration files (specifically '.copier-answers.yml') for template URLs containing unusual path segments like '..' or attempts to escape defined trusted paths.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-08-19T22:34:28Z","date_published":"2026-08-19T22:34:28Z","id":"https://feed.craftedsignal.io/briefs/2026-08-copier-trust-bypass/","summary":"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.","title":"Copier Trust-Prefix Bypass via Path Traversal","url":"https://feed.craftedsignal.io/briefs/2026-08-copier-trust-bypass/"}],"language":"en","title":"CraftedSignal Threat Feed - Copier (\u003e= 9.5.0, \u003c= 9.15.1)","version":"https://jsonfeed.org/version/1.1"}