Skip to content
Heist/ feed
Back to feed
High

Copier: trust-prefix bypass via path traversal runs tasks unprompted

Type: advisorySources: OSV

Copier is a library and CLI app for rendering project templates. In versions 9.5.0 through 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 `..` 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. Version 9.15.2 patches the issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-53951
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 00:23 UTC · Revision 1

Source evidence

Copier: trust-prefix bypass via path traversal runs tasks unprompted

core-osv · Original source

Published 8 Jul 2026, 15:26 UTC

Copier is a library and CLI app for rendering project templates. In versions 9.5.0 through 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 `..` 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. Version 9.15.2 patches the issue.

osv:CVE-2026-53951
Complete source record
{
  "id": "5ff8525f833ba5b91ba2a534a4acfcaa6e5e26d898322979cdbb70641b730dc6",
  "url": "https://osv.dev/vulnerability/CVE-2026-53951",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Copier: trust-prefix bypass via path traversal runs tasks unprompted",
    "summary": "Copier is a library and CLI app for rendering project templates. In versions 9.5.0 through 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 `..` 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. Version 9.15.2 patches the issue.",
    "evidence": "osv:CVE-2026-53951",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-53951",
      "aliases": [
        "CVE-2026-53951",
        "GHSA-9gmc-jqmh-3rvm",
        "PYSEC-2026-3818"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/copier-org/copier",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d735c8beac8307c06d9c881714328b76711a4b4d"
                },
                {
                  "fixed": "a90729e8b828ccfdd4e066696044ac20a85be81c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "9.5.0"
                      },
                      {
                        "fixed": "9.15.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a90729e8b828ccfdd4e066696044ac20a85be81c"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v9.15.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v9.15.1",
            "v9.15.0",
            "v9.14.3",
            "v9.14.2",
            "v9.14.1",
            "v9.14.0",
            "v9.13.1",
            "v9.13.0",
            "v9.12.0",
            "v9.11.3",
            "v9.11.2",
            "v9.11.1",
            "v9.11.0",
            "v9.10.3",
            "v9.10.2",
            "v9.10.1",
            "v9.10.0",
            "v9.9.1",
            "v9.9.0",
            "v9.8.0",
            "v9.7.1",
            "v9.7.0",
            "v9.6.0",
            "v9.5.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-53951.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.117298504Z",
      "provider": "osv",
      "references": [
        "https://github.com/copier-org/copier/releases/tag/v9.15.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53951.json",
        "https://github.com/copier-org/copier/security/advisories/GHSA-9gmc-jqmh-3rvm",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-53951"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22",
          "CWE-94"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53951.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-53951",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 520938,
  "published_at": "2026-07-08T15:26:08.626+00:00"
}