{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "27dd970bf6b17ebca7c8ed486a40ab043ed7af8f"
            },
            {
              "fixed": "672825e2f36a57e173959b0d9d409d4560dab8df"
            },
            {
              "fixed": "771d12dda5140313db0ac550292987975651bbde"
            },
            {
              "fixed": "79c06bd5c6afa3c440d50faf7ee1b147c8832b4c"
            },
            {
              "fixed": "be13e86f6b9788a6f4d0419dffef72cbae5865c9"
            }
          ],
          "repo": "https://github.com/python/cpython",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "PSF",
    "cwe_ids": [
      "CWE-22",
      "CWE-59"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/11xxx/CVE-2026-11940.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "fixed": "3.15.0"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "tarfile.extractall() with the 'data' or 'tar'\n filter could be bypassed by a crafted archive where a hardlink \nreferences a symlink stored at a deeper name than the hardlink itself.  \nThe extraction fallback validated the symlink at it's archived location \nbut recreated it at the hardlink's shallower\npath, letting a relative\n target the filter judged contained escape the destination directory.  \nThis allowed a malicious tar archive to create a symlink pointing \noutside the destination, enabling out-of-destination file reads or \nwrites. This was an incomplete fix of CVE-2025-4330.",
  "id": "CVE-2026-11940",
  "modified": "2026-07-08T05:39:22.576951700Z",
  "published": "2026-06-23T16:04:17.321Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/11xxx/CVE-2026-11940.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://mail.python.org/archives/list/security-announce@python.org/thread/LD6QIISNQFQYOIEPJNEUIPV7S3V76FZH/"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11940"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/python/cpython/issues/151558"
    },
    {
      "type": "FIX",
      "url": "https://github.com/python/cpython/commit/27dd970bf6b17ebca7c8ed486a40ab043ed7af8f"
    },
    {
      "type": "FIX",
      "url": "https://github.com/python/cpython/commit/672825e2f36a57e173959b0d9d409d4560dab8df"
    },
    {
      "type": "FIX",
      "url": "https://github.com/python/cpython/commit/771d12dda5140313db0ac550292987975651bbde"
    },
    {
      "type": "FIX",
      "url": "https://github.com/python/cpython/commit/79c06bd5c6afa3c440d50faf7ee1b147c8832b4c"
    },
    {
      "type": "FIX",
      "url": "https://github.com/python/cpython/commit/be13e86f6b9788a6f4d0419dffef72cbae5865c9"
    },
    {
      "type": "FIX",
      "url": "https://github.com/python/cpython/pull/151559"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/python/cpython"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "tarfile extraction filter bypass allows escaping the destination directory"
}