{"id":"CVE-2026-53951","state":"PUBLISHED","title":"Copier: trust-prefix bypass via path traversal runs tasks unprompted","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\n(`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.","publishedAt":"2026-07-08T15:26:08.626Z","updatedAt":"2026-07-09T13:47:38.033Z","severity":{"score":8.8,"label":"High","version":"4.0","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","source":"GitHub_M"},"assigner":"GitHub_M","products":["copier-org copier"],"affected":[{"vendor":"copier-org","product":"copier","versions":[{"version":">= 9.5.0, < 9.15.2","status":"affected"}]}],"references":["https://github.com/copier-org/copier/security/advisories/GHSA-9gmc-jqmh-3rvm","https://github.com/copier-org/copier/releases/tag/v9.15.2"],"weaknesses":["CWE-22","CWE-94"],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/53xxx/CVE-2026-53951.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-53951","state":"PUBLISHED","datePublished":"2026-07-08T15:26:08.626Z","dateUpdated":"2026-07-09T13:47:38.033Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-06-11T15:50:01.281Z"},"containers":{"cna":{"title":"Copier: trust-prefix bypass via path traversal runs tasks unprompted","descriptions":[{"lang":"en","value":"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\n(`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."}],"affected":[{"vendor":"copier-org","product":"copier","versions":[{"version":">= 9.5.0, < 9.15.2","status":"affected"}]}],"references":[{"url":"https://github.com/copier-org/copier/security/advisories/GHSA-9gmc-jqmh-3rvm","name":"https://github.com/copier-org/copier/security/advisories/GHSA-9gmc-jqmh-3rvm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/copier-org/copier/releases/tag/v9.15.2","name":"https://github.com/copier-org/copier/releases/tag/v9.15.2","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","subAvailabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","lang":"en","description":"CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-94","lang":"en","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-07-08T15:26:08.626Z"},"source":{"advisory":"GHSA-9gmc-jqmh-3rvm","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/copier-org/copier/security/advisories/GHSA-9gmc-jqmh-3rvm","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-09T13:46:41.622835Z","id":"CVE-2026-53951","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-09T13:47:38.033Z"}}]}}}