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

CVE-2026-23968: Copier safe template has arbitrary filesystem read access via symlinks when _preserve_symlinks: false

January 21, 2026 (updated February 2, 2026)

Copier suggests that it’s safe to generate a project from a safe template, i.e. one that doesn’t use unsafe features like custom Jinja extensions which would require passing the --UNSAFE,--trust flag. As it turns out, a safe template can currently include arbitrary files/directories outside the local template clone location by using symlinks along with _preserve_symlinks: false (which is Copier’s default setting).

Imagine, e.g., a malicious template author who creates a template that reads SSH keys or other secrets from well-known locations and hopes for a user to push the generated project to a public location like github.com where the template author can extract the secrets.

Reproducible example:

  • Illegally include a file in the generated project via symlink resolution:
echo "s3cr3t" > secret.txt

mkdir src/
pushd src/
ln -s ../secret.txt stolen-secret.txt
popd

uvx copier copy src/ dst/

cat dst/stolen-secret.txt

References

  • github.com/advisories/GHSA-xjhm-gp88-8pfx
  • github.com/copier-org/copier
  • github.com/copier-org/copier/commit/b3a7b3772d17cf0e7a4481978188c9f536c8d8f6
  • github.com/copier-org/copier/security/advisories/GHSA-xjhm-gp88-8pfx
  • nvd.nist.gov/vuln/detail/CVE-2026-23968

Code Behaviors & Features

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

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 9.11.2

Fixed versions

  • 9.11.2

Solution

Upgrade to version 9.11.2 or above.

Impact 5.5 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-61: UNIX Symbolic Link (Symlink) Following

Source file

pypi/copier/CVE-2026-23968.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:16:02 +0000.