Intel

AIKIDO-2026-284835

copier is vulnerable to Deserialization of Untrusted Data

GHSA-v9wr-3fjh-hg69Published Aug 5, 2026
August 5, 2026

87

CVE Score

High

Deserialization of Untrusted Data

Are you affected? Scan for Free

TL;DR

Copier loads a template's copier.yml and its !include configuration files with a subclass of PyYAML's FullLoader, which resolves Python-specific tags such as !!python/name:. A malicious template can set _envops.finalize to a callable like os.system, which Jinja then invokes on the result of every rendered expression. This lets an untrusted template run arbitrary shell commands during a normal copy or update without the user passing --trust. The fix derives the configuration loader from SafeLoader so Python-specific tags are rejected.

How do I fix this?

Upgrade the copier library to the patch version.

Who does this affect?

You are affected if you run copier copy or copier update against an untrusted or externally supplied template (including one referenced via _src_path in a project's .copier-answers.yml) on copier 3.0.0 through 9.17.0. No --trust flag is required: the payload lives entirely in the template's copier.yml or an !included config file, so simply rendering the template runs the injected callable. You are not exposed if every template you process is one you fully control.

Package

Versions

3.0.0 - 9.17.0

Fixed in 9.17.1

Background info

copier is vulnerable to Deserialization of Untrusted Data in versions 3.0.0 - 9.17.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea