CVE-2025-55214: Copier Package Allows Unsafe File Writes Outside Destination Path

copier Updated 14 Dec 2025

Summary

18/08/2025
Yes i
Moderate
6.9

CVE-2025-55214: Copier's safe template has filesystem write access outside destination path. Affects copier versions >= 7.1.0, < 9.9.1. Fixed in 9.9.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Copier is a Python package that facilitates project generation from templates, allowing users to create and manage project structures efficiently. It provides features for customizing project templates and supports safe and unsafe configurations. However, a vulnerability has been identified that allows safe templates to write files outside the intended destination path, posing a risk to file system integrity.

Vulnerability Detail

The vulnerability arises from Copier's handling of template paths. Although Copier suggests that templates marked as safe do not use unsafe features, it is possible for a malicious template author to exploit the pathjoin Jinja filter to create paths that lead to file writes outside the designated project directory. This can result in overwriting arbitrary files on the system, depending on the user's permissions. The issue is exacerbated when the Python optimization flag is used, which disables certain safety checks.

How To Fix

Minimum fixed version

9.9.1

This is the first release that contains the fix.

pip install --upgrade "copier==9.9.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using templates that utilize the pathjoin Jinja filter to construct paths that could lead to file writes outside the intended directory. Additionally, ensure that you run Copier in an environment where you can monitor and control file writes.

Conclusion

The CVE-2025-55214 vulnerability in the Copier package poses a significant risk by allowing safe templates to write files outside their intended paths. Users are advised to update to the patched version 9.9.1 or later to mitigate this risk. Until then, caution should be exercised when using templates.

See every vulnerability recorded for copier →

Share this vulnerability

FAQ

CVE-2025-55214 is a vulnerability in the Copier package that allows safe templates to write files outside the intended destination path, potentially leading to file system corruption.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The primary risk is that a malicious template can overwrite important files on the system, which could lead to data loss or system instability.

If you cannot update the package, avoid using templates that could exploit this vulnerability and monitor your file system for any unauthorized changes.

You can find more information about the Copier package and its features on its official documentation site.

Related vulnerabilities

Recent vulnerabilities recorded for copier.

How To Fix

Minimum fixed version

9.9.1

This is the first release that contains the fix.

pip install --upgrade "copier==9.9.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback