---
id: "CVE-2026-114583"
kind: "vulnerability"
aliases: ["CVE-2026-114583"]
title: "Python tarfile: crafted links bypass tar filter, write files outside extraction directory"
severity: "medium"
cvss: 6.9
epss: 0.00207
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["archive-extraction", "file-upload", "python", "runtime", "tarfile"]
not_affected_if: ["no-extractall", "no-tar-filter", "trusted-archives-only"]
published_at: "2026-10-22T21:17:16+00:00"
first_seen_at: "2026-10-23T21:57:32+00:00"
updated_at: "2026-10-25T03:38:48+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114583", "first_seen_at": "2026-10-23T21:57:32+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-114583", "first_seen_at": "2026-10-24T07:15:51+00:00"}]
---

# Python tarfile: crafted links bypass tar filter, write files outside extraction directory

A crafted tar archive with malicious link entries, including symlinks with empty or directory-like names, can make later members land outside the extraction directory when code calls tarfile.extractall() with filter="tar". The attacker gets file writes outside the destination, limited by the permissions of the extracting process.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `python3 --version` and compare against the patched release named in the Python advisory (the sources do not give the fixed version).
- Search the codebase for `extractall(` and `filter="tar"` to find code that extracts archives with this filter.

## Fix

- Upgrade to a patched Python release; the sources do not name the fixed version.
- Until patched, extract only archives from trusted sources, or validate archive members before extraction.

## Timeline

- 2026-10-23T21:57:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-114583
- 2026-10-24T07:15:51+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-114583

## From the sources

tarfile.tar_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() with filter="tar" to write files outside the destination directory, subject to the permissions of the extracting process.

This is the tarfile.tar_filter counterpart of CVE-2026-7774, which covered tarfile.data_filter.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
