{"answers":{"affected":"3 open source packages ship an affected version, including copier. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-23986 in the wild and no public exploit code.","fix":"Upgrade copier to 9.11.2 or later.","what":"CVE-2026-23986 is a medium-severity path traversal vulnerability in copier-org copier, published on 21 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-23986 and fix it if it is affected.\n\nWhat it is: CVE-2026-23986 is a medium-severity path traversal vulnerability in copier-org copier, published on 21 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-23986 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- copier (PyPI): affected all versions; fixed in 9.11.2\n- copier (PyPI): affected all versions; fixed in 9.11.2\n- copier (PyPI): affected all versions; fixed in 9.11.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-23986/ (Markdown: https://insights.sbomify.com/CVE-2026-23986/index.md)","id":"CVE-2026-23986","markdown":"https://insights.sbomify.com/CVE-2026-23986/index.md","name":"CVE-2026-23986","record":{"aliases":["GHSA-4fqp-r85r-hxqh","PYSEC-2026-1272"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Python template library","requires_auth":"none","summary":"A malicious template can overwrite arbitrary files outside the destination directory via symlink traversal when symlink preservation is enabled.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"copier","vendor":"copier-org"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"description":"Copier is a library and CLI app for rendering project templates. Prior to version 9.11.2, 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 write to arbitrary directories outside the destination path by using directory a symlink along with `_preserve_symlinks: true` and a generated directory structure whose rendered path is inside the symlinked directory. This way, a malicious template author can create a template that overwrites arbitrary files (according to the user's write permissions), e.g., to cause havoc. Version 9.11.2 patches the issue.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Copier safe template has arbitrary filesystem write access via directory symlinks when _preserve_symlinks: true","id":"CVE-2026-23986","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"Rufus has Local Privilege Escalation via TOCTOU Race Condition in Fido Script Handling","id":"CVE-2026-23988"},"packages":[{"ecosystem":"PyPI","fixed":["9.11.2"],"introduced":["0"],"last_affected":[],"package":"copier","purl":null,"source":"GHSA-4fqp-r85r-hxqh"},{"ecosystem":"PyPI","fixed":["9.11.2"],"introduced":["0"],"last_affected":[],"package":"copier","purl":"pkg:pypi/copier","source":"GHSA-4fqp-r85r-hxqh"},{"ecosystem":"PyPI","fixed":["9.11.2"],"introduced":["0"],"last_affected":[],"package":"copier","purl":"pkg:pypi/copier","source":"PYSEC-2026-1272"}],"prev":{"headline":"Apache Superset: Regular Expression Denial of Service (ReDoS) in SQL Parser","id":"CVE-2026-23985"},"products":["copier"],"published":"2026-01-21","related":[{"cvss_score":6.8,"headline":"Copier safe template has arbitrary filesystem read access via symlinks when _preserve_symlinks: false","id":"CVE-2026-23968","kev_date_added":null,"published":"2026-01-21"},{"cvss_score":5.5,"headline":"Copier `_external_data` allows path traversal and absolute-path local file read without unsafe mode","id":"CVE-2026-34730","kev_date_added":null,"published":"2026-04-02"},{"cvss_score":4.4,"headline":"Copier `_subdirectory` allows template root escape via parent-directory traversal","id":"CVE-2026-34726","kev_date_added":null,"published":"2026-04-02"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-01-22","vendors":["copier-org"]},"summary":"A malicious template can overwrite arbitrary files outside the destination directory via symlink traversal when symlink preservation is enabled.","url":"https://insights.sbomify.com/CVE-2026-23986/"}