# CVE-2026-34730: Copier path traversal and local file disclosure in _external_data

Source: https://junglewise.ai/threats/cve-2026-34730-copier-path-traversal-and-local-file-disclosure-in-external-data  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-02. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-34730 · Severity: medium · CVSS 5.5 · Published 2026-04-02

Copier, a tool used for generating project templates, contains a vulnerability that allows malicious templates to read sensitive files on a user's computer. If a user runs Copier using an untrusted template, that template could access and expose local YAML files, such as configuration files or stored secrets, that the user has permission to read. This could lead to the unauthorized disclosure of private data or credentials.

Technologies: [Copier-Org Copier](https://junglewise.ai/threats/technologies/copier), [copier (PyPI)](https://junglewise.ai/threats/technologies/pypi-copier). Vendors: [Copier-Org](https://junglewise.ai/threats/vendors/copier-org), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-34730 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-34730 being exploited in the wild.

**How severe is CVE-2026-34730?** Medium severity, with a CVSS score of 5.5, 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-34730?** 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-34730 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-34730?** 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

  ```sh
  pip install "copier>=9.14.1"
  ```


## Technical details

A path traversal vulnerability exists in Copier's `_external_data` feature due to a lack of containment checks in the `load_answersfile_data` function. While Copier typically restricts file access to the subproject destination, the `_external_data` implementation fails to validate that rendered paths remain within this boundary. An attacker can craft a malicious template that uses relative (e.g., `../secret.yml`) or absolute paths to read any YAML-parseable file accessible to the user running the CLI. The parsed contents are then exposed in the rendered output. This exploit does not require the `--UNSAFE` flag. The issue is fixed in version 9.14.1 by requiring the `--trust` flag for paths outside the subproject root.

## Affected products

- copier-org Copier < 9.14.1

## Identifiers

- CVE-2026-34730
- GHSA-hgjq-p8cr-gg4h
- PYSEC-2026-2135

## Timeline

- 2026-03-31: patched: Fix committed and version 9.14.1 released.
- 2026-04-02: disclosed: Advisory published.

## References

- [https://github.com/copier-org/copier/commit/5413062eb17b73dc885f5e645cdc161e69ef641b](https://github.com/copier-org/copier/commit/5413062eb17b73dc885f5e645cdc161e69ef641b)
- [https://github.com/copier-org/copier/releases/tag/v9.14.1](https://github.com/copier-org/copier/releases/tag/v9.14.1)
- [https://github.com/copier-org/copier/security/advisories/GHSA-hgjq-p8cr-gg4h](https://github.com/copier-org/copier/security/advisories/GHSA-hgjq-p8cr-gg4h)

## Related threats

- [Copier trust-prefix bypass via path traversal in trusted template URLs](https://junglewise.ai/threats/cve-2026-53951-copier-trust-prefix-bypass-via-path-traversal-in-trusted-template)
- [PYSEC-2026-1272 - Copier safe template has arbitrary filesystem write access via directory symlinks when _preserve_symlinks: true](https://junglewise.ai/threats/cve-2026-23986-copier-safe-template-has-arbitrary-filesystem-write-access-via)
- [PYSEC-2026-1274 - Copier safe template has arbitrary filesystem read access via symlinks when _preserve_symlinks: false](https://junglewise.ai/threats/cve-2026-23968-copier-safe-template-has-arbitrary-filesystem-read-access-via)
- [PYSEC-2026-1273 - Copier's safe template has filesystem write access outside destination path](https://junglewise.ai/threats/cve-2025-55214-copier-s-safe-template-has-filesystem-write-access-outside)
- [PYSEC-2026-1271 - Copier's safe template has arbitrary filesystem read/write access](https://junglewise.ai/threats/cve-2025-55201-copier-s-safe-template-has-arbitrary-filesystem-read-write-access)
