Skip to content
Heist/ feed
Back to feed
Low

Quadratic complexity in os.path.expandvars() with user-controlled template

Type: advisorySources: OSV

If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding environment variables.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-6075
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 09:03 UTC · Revision 1

Source evidence

Quadratic complexity in os.path.expandvars() with user-controlled template

core-osv · Original source

Published 31 Oct 2025, 16:41 UTC

If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding environment variables.

osv:CVE-2025-6075
Complete source record
{
  "id": "7cc506d8072806c36788834194b37e15aa57e9da93a68e3fe4eb837b2f2f85a2",
  "url": "https://osv.dev/vulnerability/CVE-2025-6075",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Quadratic complexity in os.path.expandvars() with user-controlled template",
    "summary": "If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding environment variables.",
    "evidence": "osv:CVE-2025-6075",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2025-6075",
      "aliases": [
        "BIT-libpython-2025-6075",
        "BIT-python-2025-6075",
        "BIT-python-min-2025-6075",
        "CVE-2025-6075",
        "PSF-2025-13"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/python/cpython",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "9cf6752276e6fcfd0c23fdb064ad27f448aaaf75"
                },
                {
                  "introduced": "067145177975eadd61a0c907d0d177f7b6a5a3de"
                },
                {
                  "fixed": "627894459a84be3488a1789919679c997056a03c"
                },
                {
                  "introduced": "ebf955df7a89ed0c7968f79faec1de49f61ed7cb"
                },
                {
                  "fixed": "57e0d177c26d4a508ef46adae9cbae46fca39f70"
                },
                {
                  "fixed": "2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c"
                },
                {
                  "fixed": "5dceb93486176e6b4a6d9754491005113eb23427"
                },
                {
                  "fixed": "631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84"
                },
                {
                  "fixed": "892747b4cf0f95ba8beb51c0d0658bfaa381ebca"
                },
                {
                  "fixed": "9ab89c026aa9611c4b0b67c288b8303a480fe742"
                },
                {
                  "fixed": "c8a5f3435c342964e0a432cc9fb448b7dbecd1ba"
                },
                {
                  "fixed": "f029e8db626ddc6e3a3beea4eff511a71aaceb5c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:python:python:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.9.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:python:python:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.13.1"
                      },
                      {
                        "fixed": "3.13.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:python:python:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.14.0"
                      },
                      {
                        "fixed": "3.14.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5dceb93486176e6b4a6d9754491005113eb23427"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "892747b4cf0f95ba8beb51c0d0658bfaa381ebca"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9ab89c026aa9611c4b0b67c288b8303a480fe742"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "c8a5f3435c342964e0a432cc9fb448b7dbecd1ba"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f029e8db626ddc6e3a3beea4eff511a71aaceb5c"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.15.0a1",
            "v3.13.8",
            "v3.11.14",
            "v3.10.19",
            "v3.9.24",
            "v3.12.12",
            "v3.14.0",
            "v3.13.7",
            "v3.13.6",
            "v3.13.5",
            "v3.13.4",
            "v3.11.13",
            "v3.9.23",
            "v3.10.18",
            "v3.12.11",
            "v3.14.0b1",
            "v3.9.22",
            "v3.13.3",
            "v3.11.12",
            "v3.12.10",
            "v3.14.0a7",
            "v3.10.17",
            "v3.14.0a6",
            "v3.14.0a5",
            "v3.13.2",
            "v3.12.9",
            "v3.14.0a4",
            "v3.14.0a3",
            "v3.13.1",
            "v3.12.8",
            "v3.10.16",
            "v3.11.11",
            "v3.9.21",
            "v3.14.0a2",
            "v3.14.0a1",
            "v3.12.7",
            "v3.11.10",
            "v3.10.15",
            "v3.12.6",
            "v3.9.20",
            "v3.12.5",
            "v3.12.4",
            "v3.13.0b1",
            "v3.13.0a6",
            "v3.12.3",
            "v3.11.9",
            "v3.10.14",
            "v3.9.19",
            "v3.13.0a5",
            "v3.13.0a4",
            "v3.12.2",
            "v3.11.8",
            "v3.13.0a3",
            "v3.12.1",
            "v3.11.7",
            "v3.13.0a2",
            "v3.13.0a1",
            "v3.11.6",
            "v3.12.0",
            "v3.12.0rc3",
            "v3.12.0rc2",
            "v3.11.5",
            "v3.9.18",
            "v3.10.13",
            "v3.12.0rc1",
            "v3.12.0b4",
            "v3.12.0b3",
            "v3.11.4",
            "v3.10.12",
            "v3.12.0b2",
            "v3.9.17",
            "v3.12.0b1",
            "v3.10.11",
            "v3.11.3",
            "v3.12.0a7",
            "v3.12.0a6",
            "v3.10.10",
            "v3.11.2",
            "v3.12.0a5",
            "v3.12.0a4",
            "v3.12.0a3",
            "v3.10.9",
            "v3.11.1",
            "v3.9.16",
            "v3.12.0a2",
            "v3.12.0a1",
            "v3.11.0rc2",
            "v3.10.8",
            "v3.9.15",
            "v3.9.14",
            "v3.10.7",
            "v3.11.0rc1",
            "v3.10.6",
            "v3.11.0b5",
            "v3.11.0b4",
            "v3.10.5",
            "v3.11.0b3",
            "v3.11.0b2",
            "v3.9.13",
            "v3.11.0b1",
            "v3.11.0a7",
            "v3.10.4",
            "v3.9.12",
            "v3.9.11",
            "v3.10.3",
            "v3.11.0a6",
            "v3.11.0a5",
            "v3.11.0a4",
            "v3.10.2",
            "v3.11.0a3",
            "v3.10.1",
            "v3.9.9",
            "v3.9.8",
            "v3.10.0rc2",
            "v3.9.7",
            "v3.10.0rc1",
            "v3.10.0b4",
            "v3.9.6",
            "v3.10.0b3",
            "v3.10.0b2",
            "v3.10.0b1",
            "v3.9.5",
            "v3.10.0a7",
            "v3.9.2",
            "v3.9.2rc1",
            "v3.10.0a1",
            "v3.9.0b5",
            "v3.9.0b3",
            "v3.9.0b1",
            "v3.9.0a2",
            "v3.7.0a2",
            "v3.6.0b1",
            "v3.6.0a3",
            "v3.5.0b1",
            "v3.5.0a4",
            "v3.5.0a3",
            "v3.5.0a2",
            "v3.5.0a1",
            "v3.4.0b3",
            "v3.4.0b2",
            "v3.4.0b1",
            "v3.4.0a4",
            "v3.4.0a3",
            "v3.4.0a2",
            "v3.4.0a1",
            "v3.3.0rc3",
            "v3.3.0rc2",
            "v3.3.0rc1",
            "v3.3.0b2",
            "v3.3.0b1",
            "v3.3.0a4",
            "v3.3.0a3",
            "v3.3.0a2",
            "v3.2rc3",
            "v3.2rc2",
            "v3.2rc1",
            "v3.2b2",
            "v3.2b1",
            "v3.2a4",
            "v3.2a3",
            "v3.2a2",
            "v3.2a1",
            "v3.1",
            "v3.1rc2",
            "v3.1rc1",
            "v3.1b1",
            "v3.1a2",
            "v3.1a1",
            "v3.0rc3",
            "v3.0rc2",
            "v3.0rc1",
            "v3.0b3",
            "v3.0b2",
            "v3.0b1",
            "v3.0a5",
            "v3.0a4",
            "v3.0a3",
            "v3.0a2",
            "v3.0a1",
            "v2.4",
            "v2.4c1",
            "v2.4b2",
            "v2.4b1",
            "v2.4a3",
            "v2.4a2",
            "v2.4a1",
            "v2.3c2",
            "v2.3c1",
            "v2.2a3",
            "v2.1",
            "v2.1c2",
            "v2.1c1",
            "v2.1b2",
            "v2.1b1",
            "v2.1a2",
            "v2.1a1",
            "v2.0",
            "v2.0c1",
            "v2.0b2",
            "v2.0b1",
            "v1.6a2",
            "v1.6a1",
            "v1.5.2",
            "v1.5.2c1",
            "v1.5.2b2",
            "v1.5.2b1",
            "v1.5.2a2",
            "v1.5.2a1",
            "v1.5.1",
            "v1.5",
            "v1.5b2",
            "v1.5b1",
            "v1.5a4",
            "v1.5a3",
            "v1.5a2",
            "v1.5a1",
            "v1.4",
            "v1.4b3",
            "v1.4b2",
            "v1.4b1",
            "v1.3",
            "v1.3b1",
            "v1.2",
            "v1.2b4",
            "v1.2b3",
            "v1.2b2",
            "v1.2b1",
            "v1.1.1",
            "v1.1",
            "v1.0.2",
            "v1.0.1",
            "v0.9.9",
            "v0.9.8"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-6075.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:47.143412028Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/6xxx/CVE-2025-6075.json",
        "https://mail.python.org/archives/list/security-announce@python.org/thread/IUP5QJ6D4KK6ULHOMPC7DPNKRYQTQNLA/",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-6075",
        "https://github.com/python/cpython/issues/136065",
        "https://github.com/python/cpython/commit/2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c",
        "https://github.com/python/cpython/commit/5dceb93486176e6b4a6d9754491005113eb23427",
        "https://github.com/python/cpython/commit/631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84",
        "https://github.com/python/cpython/commit/892747b4cf0f95ba8beb51c0d0658bfaa381ebca",
        "https://github.com/python/cpython/commit/9ab89c026aa9611c4b0b67c288b8303a480fe742",
        "https://github.com/python/cpython/commit/c8a5f3435c342964e0a432cc9fb448b7dbecd1ba",
        "https://github.com/python/cpython/commit/f029e8db626ddc6e3a3beea4eff511a71aaceb5c",
        "https://github.com/python/cpython"
      ],
      "provider_metadata": {
        "cna_assigner": "PSF",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/6xxx/CVE-2025-6075.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-6075",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 515047,
  "published_at": "2025-10-31T16:41:34.983+00:00"
}