CVE-2026-34726: Copier path traversal via _subdirectory setting

CVE-2026-34726 · Severity: medium · CVSS 4.4 · Published 2026-04-02

Copier is a tool used by developers to create new projects from templates. A security flaw allows malicious templates to access and process files outside of their own folder by using directory traversal shortcuts. If a user processes an untrusted template, it could lead to the unintended exposure or modification of sensitive files on the user's system.

Technologies: Copier-Org Copier, copier (PyPI). Vendors: Copier-Org, PyPI.

Quick answers

Is CVE-2026-34726 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-34726 being exploited in the wild.
How severe is CVE-2026-34726?
Medium severity, with a CVSS score of 4.4, published 2 April 2026.
Which products and versions are affected?
Copier-Org Copier < 9.14.1; copier (PyPI) ECOSYSTEM:introduced=0,fixed=9.14.1.
Is there a fix for CVE-2026-34726?
Yes. copier (PyPI): upgrade to 9.14.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-34726 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-34726?
Check whether you run Copier-Org Copier or copier (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • copier (PyPI): upgrade to 9.14.1 or later
    pip install "copier>=9.14.1"

Technical details

A path traversal vulnerability exists in Copier's '_subdirectory' configuration setting. The application fails to validate that the rendered path for the template root remains within the bounds of the template's local directory. By supplying traversal sequences such as '..' in the '_subdirectory' field, an attacker can force Copier to treat the parent directory as the template root. This allows the rendering and potential exposure of files outside the intended template scope without the user explicitly enabling '--UNSAFE' mode. The issue is rooted in the 'template_copy_root' function in '_main.py' which joins the base path with the user-controlled subdirectory string without sanitization. This has been patched in version 9.14.1.

Affected products

  • copier-org Copier < 9.14.1

Identifiers

  • CVE-2026-34726
  • GHSA-85v3-4m8g-hrh6
  • PYSEC-2026-2134

Timeline

  • 2026-03-31: patched: Version 9.14.1 released
  • 2026-03-31: advisory: GitHub Security Advisory GHSA-85v3-4m8g-hrh6 published
  • 2026-04-02: disclosed: CVE-2026-34726 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.