GHSA-58PV-8J8X-9VJ2

Stripped Vulnerable: The jaraco.context Zip Slip

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 14, 2026·5 min read·35 visits

Executive Summary (TL;DR)

The `tarball()` function in `jaraco.context` attempts to be helpful by stripping the top-level directory from archives during extraction. However, it does this via naive string manipulation (`split` and `join`) before any security validation occurs. This allows an attacker to craft a tarball that, once 'stripped', resolves to a traversal path like `../../etc/passwd`, enabling arbitrary file overwrite and RCE. Since this package is vendored by `setuptools`, the blast radius is massive.

A critical path traversal vulnerability in jaraco.context, a package vendored by the ubiquitous setuptools, allows attackers to escape extraction directories via malicious tar archives.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Probability
15.00%
Top 99% most exploited

Affected Systems

jaraco.contextsetuptoolsPython tools relying on jaraco.context.tarball()

Affected Versions Detail

Product
Affected Versions
Fixed Version
jaraco.context
jaraco
< 2026-01-13 patchcommit 7b26a42
setuptools
PyPA
Affected versions vendoring jaraco.contextUnknown (Vendor Update Required)
AttributeDetail
Attack VectorNetwork (Malicious Tarball)
CVSS Base Score8.8 (High)
ImpactArbitrary File Write / RCE
Exploit StatusPoC Available
Vulnerability TypePath Traversal (Zip Slip)
Key Componentstrip_first_component filter
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as '..' that can resolve to a location that is outside of that directory.

Vulnerability Timeline

Fix merged in jaraco.context (Commit 7b26a42)
2026-01-13
GHSA-58PV-8J8X-9VJ2 Published
2026-01-13