Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. copier
  4. ›
  5. CVE-2026-53951

CVE-2026-53951: Copier has a trust-prefix bypass via path traversal that runs tasks unprompted

August 19, 2026

In copier >= 9.5.0, <= 9.15.1, the trust setting’s prefix match (copier/_settings.py) compares the template URL against a trusted prefix with a raw str.startswith and no path normalization, while the URL is normalized when the template is actually fetched (Path.resolve() for local paths; libcurl dot-segment removal for https). A template reference that textually starts with a trusted prefix but contains .. (e.g. https://github.com/trusted-org/../attacker-org/repo.git) is therefore granted trust yet resolves to a different, attacker-controlled template, whose tasks / migrations / jinja_extensions then run without the --trust prompt — arbitrary command execution. Likely CWE-22 (Improper Limitation of a Pathname) in the trust check leading to CWE-94 (code execution).

References

  • github.com/advisories/GHSA-9gmc-jqmh-3rvm
  • github.com/copier-org/copier/releases/tag/v9.15.2
  • github.com/copier-org/copier/security/advisories/GHSA-9gmc-jqmh-3rvm
  • nvd.nist.gov/vuln/detail/CVE-2026-53951

Code Behaviors & Features

Detect and mitigate CVE-2026-53951 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 9.5.0 before 9.15.2

Fixed versions

  • 9.15.2

Solution

Upgrade to version 9.15.2 or above.

Impact 8.6 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/copier/CVE-2026-53951.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 06 Sep 2026 12:16:41 +0000.