copier is vulnerable to Path Traversal
55
Medium Risk
Copier renders templates with a Jinja loader that follows {% include %} directives. When _preserve_symlinks is enabled, the loader follows a symlink whose target resolves outside the template root, reading external file contents into the generated project and recreating the symlink there. Processing an untrusted template this way discloses arbitrary local files without enabling unsafe mode. The fix replaces the unrestricted FileSystemLoader with a loader that resolves the included filename and rejects symlinks escaping the template root.
You are affected if you are using a version that falls within the vulnerable range and you process an untrusted template with _preserve_symlinks enabled that uses a Jinja include referencing a symlink.
copier is vulnerable to Path Traversal in versions 0.0.1 - 9.17.1.
Upgrade the copier library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant