{"id":"CVE-2026-34726","published":"2026-04-02T18:07:35Z","modified":"2026-04-03T16:16:03Z","title":"Copier `_subdirectory` allows template root escape via parent-directory traversal","vendor":"copier-org","product":"copier","tier":"tail","description":{"text":"Copier is a library and CLI app for rendering project templates. Prior to version 9.14.1, Copier's _subdirectory setting is documented as the subdirectory to use as the template root. However, the current implementation accepts parent-directory traversal such as .. and uses it directly when selecting the template root. As a result, a template can escape its own directory and make Copier render files from the parent directory without --UNSAFE. This issue has been patched in version 9.14.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00406,"percentile":0.35783,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/copier-org/copier/security/advisories/GHSA-85v3-4m8g-hrh6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/copier-org/copier/commit/cb80a3ffc9c3787de3ed837e04ca29a0ff8ca3df","tags":["x_refsource_MISC"]},{"url":"https://github.com/copier-org/copier/releases/tag/v9.14.1","tags":["x_refsource_MISC"]}],"priority":{"score":10.2,"factors":[{"name":"EPSS percentile","points":7.16},{"name":"CVSS severity","points":3.08}]},"vendorSlug":"copier-org","affectedVersions":[{"vendor":"copier-org","product":"copier","versions":["< 9.14.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-03T16:15:43.192383Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"copier","vulnerableRanges":["<9.14.1"],"patched":["9.14.1"],"from":["GHSA-85v3-4m8g-hrh6","PYSEC-2026-2134"],"provenance":"source"}],"summary":{"text":"Copier's _subdirectory setting, which is meant to select the template root, accepts parent-directory traversal sequences such as .. and uses them directly, so a template can point its root outside its own directory in the copier library and CLI. An attacker who supplies a malicious template needs only local access and a user to run it (no authentication is required), and once rendered, Copier reads files from the parent directory without the --UNSAFE flag, exposing content beyond the template's intended scope.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:08:29Z"},"euvd":{"id":"EUVD-2026-18495","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-55214","published":"2025-08-18","fixed":"9.9.1","kev":false},{"cve":"CVE-2026-23968","published":"2026-01-21","fixed":"9.11.2","kev":false},{"cve":"CVE-2026-23986","published":"2026-01-21","fixed":"9.11.2","kev":false,"link":{"from":"CVE-2026-23986","to":"CVE-2026-34726","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:copier","fromFixed":"9.11.2","toFixed":"9.14.1","daysApart":71},{"kind":"same-code","provenance":"machine","files":["copier/_main.py"],"commits":["https://github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6","https://github.com/copier-org/copier/commit/cb80a3ffc9c3787de3ed837e04ca29a0ff8ca3df"],"basis":"shared file"}]}},{"cve":"CVE-2026-34726","published":"2026-04-02","fixed":"9.14.1","kev":false},{"cve":"CVE-2026-34730","published":"2026-04-02","fixed":"9.14.1","kev":false},{"cve":"CVE-2026-53951","published":"2026-07-08","fixed":"9.15.2","kev":false,"link":{"from":"CVE-2026-34726","to":"CVE-2026-53951","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:copier","fromFixed":"9.14.1","toFixed":"9.15.2","daysApart":97}]}}],"package":"PyPI:copier"}}