Why checking one interpreter is not enough

CVE-2025-4517 is a critical arbitrary-file-write flaw in Python tar extraction. It can bypass the intended path boundary even when application code uses the data or tar filter. A patched host interpreter does not help if the worker container still contains an older CPython build.

The Python project published fixed releases at 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.4 and 3.14.0b1. Each deployment should be mapped to the branch and artifact it actually runs.

The vulnerable path

The extraction check uses os.path.realpath to resolve member destinations. A long symlink chain can push the resolved path beyond the platform limit. Realpath then returns an incorrect path, and the filter can accept a file that escapes the extraction directory. The Python fix normalizes link targets and uses a strict allow-missing resolution mode.

Inventory and verification

List base images, sidecars, job images and packaged applications that embed Python. Record the image digest, branch, patch release and the source of each interpreter. Do not rely only on a package metadata query from the build host.

At runtime, print the interpreter version from inside the container and confirm the code path used by the archive job. Rebuild derived images after the base image update. If the application vendors CPython, rebuild it from the fixed source and preserve the build attestations.

Exposure context

A ZoomEye query for app="Python" returned 60035 matches. The CVE-specific query returned 0. Product fingerprint coverage helps with discovery, but it cannot distinguish an exposed archive parser from an unrelated Python service.

Remediation and mitigations

Patch the runtime, redeploy every derived artifact, and test the deployed service with a crafted long-link archive in an isolated environment. Until that is complete, reject links with .., inspect archive members and prevent the worker from writing into application or credential paths.

The validation record should include the image digest, the running interpreter version, the extraction entry point and the test result. A successful build with no runtime check is not enough to close the issue.

References