18 min read ·
How to Determine Whether the jaraco.context Tar Traversal Flaw Exposes Your Application
The documented path requires crafted or otherwise untrusted tar content to pass through the affected extraction behavior.

GHSA-58pv-8j8x-9vj2 at a glance
GHSA-58pv-8j8x-9vj2, assigned CVE-2026-23949, is a Zip Slip path-traversal vulnerability in the Python package jaraco.context. It is classified as CWE-22, Improper Limitation of a Pathname to a Restricted Directory. GitHub’s reviewed advisory assigns it a CVSS 3.1 score of 8.6 High, with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N. The reviewed GitHub advisory documents the identifiers, weakness classification, severity, and vector.
The concise assessment is:
- Affected:
jaraco.context >=5.2.0 and <6.1.0 - First patched release:
jaraco.context 6.1.0 - Runtime trigger: attacker-controlled or otherwise untrusted tar content reaches
jaraco.context.tarball()or the reported vulnerable implementation vendored in setuptools - Primary response: upgrade the standalone
jaraco.contextpackage to 6.1.0 or later, then investigate the setuptools copy separately
The affected range includes version 5.2.0 and the 6.0.x line but excludes 6.1.0, which contains the upstream patch. NVD records the precise two-sided range and fixed release.
Finding an affected package establishes that vulnerable code is present. It does not, by itself, establish that the application is exploitable. The documented path requires crafted or otherwise untrusted tar content to pass through the affected extraction behavior.
The network attack vector in the CVSS string also does not mean that jaraco.context starts a listener or independently exposes a network service. Remote reachability comes from the surrounding application—for example, an upload endpoint, artifact fetcher, build service, package mirror, import pipeline, or automation process that receives tar content from an untrusted source.
Patch first rather than waiting for a complete exploitability study. Upgrade ordinary jaraco.context installations to 6.1.0 or later, rebuild and redeploy the affected artifacts, and verify the installed runtime version. In parallel, check whether an installed setuptools distribution carries a private vendored implementation, because changing the standalone dependency cannot be assumed to change source code bundled inside another package.
Affected and fixed versions
The confirmed range has both a lower and an upper boundary. Versions beginning with 5.2.0 and ending before 6.1.0 are affected; 6.1.0 is the first fixed release. NVD’s CVE record states the upstream boundaries explicitly.
Installed jaraco.context version |
Upstream status | Interpretation |
|---|---|---|
<5.2.0 |
Outside the confirmed affected range | Do not label it vulnerable to this CVE solely because it predates 6.1.0. It may still have unrelated security or support concerns. |
>=5.2.0 and <6.1.0 |
Affected | Includes 5.2.0, subsequent 5.x releases, and the 6.0.x line. Runtime exposure still depends on archive processing. |
>=6.1.0 |
Patched upstream | Version 6.1.0 is excluded from the affected interval and is the first fixed release. |
Boundary handling matters. Version 5.2.0 is included because the lower comparison is inclusive. Version 6.1.0 is excluded because the upper comparison is exclusive. Descriptions that say only “before 6.1.0” are too broad for precise inventory decisions because they omit the confirmed 5.2.0 lower boundary.
The referenced patch is commit 7b26a42b525735e4085d2e994e13802ea339d5f9. The corrected implementation reportedly composes first-component stripping with tarfile.data_filter instead of treating component removal as sufficient path protection. GitHub’s reviewed advisory identifies the patch commit and corrected filtering approach.
Treat setuptools as a distinct versioning problem
The advisory reports an inherited or vendored implementation under:
setuptools._vendor.jaraco.context
The available evidence does not establish which setuptools releases contain the vulnerable implementation or which setuptools release first contains a correction. The reported namespace and extraction flow therefore require separate investigation. The vulnerability report identifies the setuptools-vendored location but does not provide release boundaries.
That creates two separate questions:
- Is the independently installed
jaraco.contextdistribution in the affected range? - Does the installed setuptools distribution include and execute a vulnerable private copy?
These copies do not necessarily share package metadata or upgrade behavior. Installing jaraco.context>=6.1.0 may fix imports that resolve to the standalone package, but it is not proof that setuptools._vendor.jaraco.context changed. Establish the provenance of the code that the relevant workflow actually executes.
Downstream advisories must also be read narrowly. Broadcom states that Platform Automation Toolkit 5.4.1 resolves CVE-2026-23949 in its platform-automation component. That confirms a fixed downstream product release; it does not prove that every earlier toolkit release was affected. Broadcom lists the issue among the security fixes in Platform Automation Toolkit 5.4.1.
The exact trigger condition and exposure decision tree
Practical exposure requires a chain of conditions. Assess code and data flow rather than treating the package version or CVSS score as a substitute for deployment analysis.
-
Is vulnerable code present? - Compare the installed standalone
jaraco.contextversion with>=5.2.0 and <6.1.0. - Independently inspect setuptools for the reported vendored implementation. - If neither an affected upstream version nor a vulnerable private copy is present, the documented flaw is not present in that environment. -
Does the application invoke the affected behavior? - Locate calls to
jaraco.context.tarball(). - Search for imported aliases, wrappers, callbacks, context managers, and helper functions that eventually invoke it. - For setuptools, determine whether any reachable path calls the vendored implementation. Mere presence of the private module does not establish runtime reachability. -
Can an attacker or untrusted party influence the tar archive? - Include direct uploads and archives downloaded from user-supplied URLs. - Review package, plugin, model, theme, template, backup, dataset, and artifact import features. - Include mutable object stores, mirrors, registries, shared directories, and network locations. - Consider replacement by a less-trusted tenant, user, job, or compromised upstream system. - Treat generated archives as untrusted when external parties control their member names or embedded content.
-
Can a crafted member reach the vulnerable filter? - The relevant member contains traversal components that remain after its leading component is removed. - Validation before renaming, prefixing, wrapping, or unpacking may be insufficient if a later stage changes the effective path. - Confirm which extraction filter runs rather than inferring safety from the Python version alone.
-
Does the workflow process nested archives? - An acceptable-looking outer archive may carry an inner tar file. - Exposure can arise if a later stage opens that inner archive through the vulnerable helper. - Map background jobs and post-processing workers, not only the first upload handler.
-
Can the resulting path escape into a writable location? - Identify the configured extraction root. - Determine where the transformed and normalized member path resolves. - Account for traversal depth, filesystem layout, operating-system path behavior, and process permissions. - Identify parent directories and other out-of-root locations writable by the extraction identity.
The result should fall into one of three bounded categories:
- Not affected by the confirmed upstream range: the executed standalone version is outside
>=5.2.0 and <6.1.0, and no vulnerable vendored copy is present. - Affected but not exposed through the documented trigger: vulnerable code exists, but attacker-influenced tar content does not reach the affected extraction path.
- Potentially exploitable: vulnerable code is reachable with untrusted archive content, and a crafted member could resolve outside the extraction root into a location writable by the process.
“Not exposed through the documented trigger” is not a general security guarantee about the package, archive parser, or application. It is a conclusion limited to this vulnerability and the assessed workflow.
Red Hat likewise makes the processing of malicious or untrusted archives through jaraco.context.tarball() central to the trigger. Its mitigation guidance recommends avoiding such processing or using an isolated, minimally privileged environment. Red Hat describes the runtime condition and temporary mitigation.
This conditional trigger explains why a public archive-import service may be remotely reachable while an offline application processing only authenticated, immutable internal artifacts has a materially different exposure profile.
Why strip_first_component permits path traversal
The vulnerable behavior results from a mismatch between path transformation and destination containment.
Archives commonly place all members below one top-level directory. Extraction code may remove that directory so the contents land directly in the chosen destination. Removing the prefix is not sufficient validation, however, because the remaining path may still contain parent-directory components.
The advisory’s conceptual example is:
Before first-component removal:
dummy_dir/../../etc/passwd
After first-component removal:
../../etc/passwd
The example shows how traversal components survive the transformation. It does not establish arbitrary read access to an existing host password file. The published vulnerability description documents this exact path transformation.
Suppose the extraction root is:
/work/jobs/current/extract/
A resulting member name beginning with ../../ may resolve above extract/. The final destination depends on the number of parent components, the extraction root’s position, normalization rules, platform behavior, and the extraction process’s ability to create or replace a file there.
The confirmed primitive is therefore placing archive-supplied content outside the intended extraction root. It is not inherently a primitive for reading arbitrary existing files. Broader consequences require additional conditions, such as a reachable and writable target followed by application behavior that loads, executes, publishes, or otherwise trusts the escaped file.
Why checking only the original prefix fails
A superficial check might confirm that a member begins with dummy_dir/. That says nothing about the safety of the remainder after dummy_dir is removed.
The required security property is containment: after every transformation and normalization step, the candidate destination must remain a descendant of the intended extraction root.
String checks alone are fragile. Searching only for a literal ../, trimming leading separators, or removing one component does not establish where a path ultimately resolves. The defensive question is not “Does this member have the expected prefix?” but “Does the final destination remain inside the extraction root after the exact transformations used during extraction?”
Nested-archive variation
Nested processing separates delivery from activation. An outer archive can contain an inner tar archive that initially appears to be an ordinary file. If a later stage recognizes and extracts that inner tar through the vulnerable helper, traversal-bearing members inside it can reach the affected filter.
Controls applied only to the first ingestion layer may therefore be incomplete. Review file-type detection, extension-based automation, plugin installers, import pipelines, and background workers that recursively unpack archives. An inner archive remains attacker-influenced even if a trusted first-stage process wrote it to disk.
The issue is associated with the custom first-component filtering behavior. The reported correction combines that transformation with tarfile.data_filter; limited testing described in advisory material should not be generalized into claims that every Python version, operating system, or filesystem behaves identically. The advisory material describes the custom filtering problem and the reported corrected approach.
Exploit evidence, severity, and realistic impact
Published proof-of-concept evidence demonstrated creation of a file named escaped.txt in the parent of the intended extraction directory. That confirms a parent-directory escape under the tested conditions. The vulnerability report records the successful escaped.txt proof-of-concept result.
The result should be described precisely. It establishes that archive-supplied content can cross the extraction boundary. It does not show that every desired destination is reachable, that protected operating-system files can be overwritten, or that secondary compromise follows automatically.
Successful exploitation is constrained by:
- the crafted member path and traversal depth;
- the extraction root’s filesystem position;
- normalization and platform-specific path handling;
- the permissions of the user, service account, container, or job performing extraction;
- mount configuration, sandbox boundaries, and read-only filesystems;
- whether an existing destination can be replaced;
- whether another component subsequently reads, loads, executes, or trusts the escaped file.
Possible secondary scenarios include replacing application configuration, placing content in a directory monitored by another service, modifying executable content, or disrupting a workflow. Each requires a suitable target that is reachable and writable. Many also require later application behavior. Code execution, credential theft, privilege escalation, denial of service, and supply-chain compromise should therefore be treated as conditional scenarios—not automatic outcomes of processing one malicious archive.
The CVSS score of 8.6 High is a standardized advisory severity assessment. It helps with portfolio triage, but it does not prove that every deployment has the same endpoint exposure or blast radius. A public import service running with broad filesystem access deserves different urgency from an application that installs the dependency but never invokes the affected helper.
CISA SSVC data displayed by NVD records exploitation status as “poc.” This supports the existence of proof-of-concept exploitation, not a conclusion that malicious exploitation has occurred in the wild.
The supplied evidence does not establish active exploitation in the wild. Predictive EPSS values, repository counts, proof-of-concept labels, or the absence of a vulnerability from a particular catalog should not be converted into claims that attacks have—or have not—occurred. None of those signals should delay patching a reachable extraction workflow.
How to inventory direct, transitive, and vendored exposure
Inventory the flaw through three separate lenses. Conventional dependency output is useful, but it may not reveal private source copies bundled inside another distribution.
1. Direct dependency
A project directly declares jaraco.context in a requirements file, lockfile, project metadata file, environment definition, or image build.
For every deployed environment:
- determine the installed version rather than only the version allowed by a constraint;
- compare it with
>=5.2.0 and <6.1.0; - inspect production containers, workers, build images, maintenance jobs, and administrative environments;
- confirm that the patched lockfile or image was actually deployed.
Safe inventory techniques include querying Python package metadata from inside the runtime environment, examining dependency-tree or SBOM output, and inspecting the installed distribution’s metadata. Repository declarations alone may be stale or may differ from resolved runtime versions.
2. Transitive dependency
Another package may cause jaraco.context to be installed during dependency resolution. Lockfile inspection, package inventories, dependency-tree output, and SBOM tooling can identify the resolved distribution and version.
After locating it, trace actual imports and calls. Search the application and deployed source for:
jaraco.context.tarball
from jaraco.context import tarball
Also inspect aliases, wrappers, callbacks, archive download helpers, and plugin or artifact installation code. Search results establish possible reachability, not execution; follow the call path into runtime workflows.
For each archive passed to the helper, record whether it is:
- uploaded by a user;
- downloaded from a user-controlled URL;
- copied from shared or mutable storage;
- retrieved from an authenticated, immutable source;
- generated locally from externally controlled names or content;
- extracted again by a later worker.
3. Privately vendored code
Vendoring places copied source code inside another package’s namespace. The reported setuptools location is:
setuptools._vendor.jaraco.context
An ordinary query for the installed jaraco.context distribution may not identify the version or patch state of that private copy. The standalone distribution could be absent—or fully patched—while the setuptools namespace contains different code.
Inspect the installed setuptools artifact directly and determine:
- whether the vendored module and affected filtering behavior are present;
- whether any executable path imports or invokes that implementation;
- whether the installed source contains the corrected filtering approach;
- what authoritative setuptools release guidance applies to the exact artifact.
Do not derive a setuptools version boundary from the upstream jaraco.context range. The available evidence reports the vendored location but does not define affected or fixed setuptools releases. Do not close the finding merely because the standalone package was upgraded.
Map nested processing and filesystem authority
For every reachable extraction stage, document:
| Inventory field | Question to answer |
|---|---|
| Code identity | Which package, vendored module, function, and deployed artifact perform extraction? |
| Archive origin | Who or what can create, upload, replace, redirect, or modify the archive? |
| Nested behavior | Are archive-like members opened automatically during a later stage? |
| Extraction root | What exact destination is used for each workflow or tenant? |
| Process identity | Which user, service account, container, or job performs extraction? |
| Writable locations | Which parent and out-of-root directories can that identity modify? |
| Trust transition | Which later service reads, imports, executes, or publishes extracted content? |
This turns a package alert into an exposure model. It can also reveal where privilege reduction and isolation would contain impact while vendored-version questions remain unresolved.
Remediation and temporary controls
The primary upstream remediation is to upgrade jaraco.context to 6.1.0 or later. Rebuild and redeploy affected artifacts, then verify the installed version from inside the deployed container, virtual environment, host, or job image. Version 6.1.0 is the first fixed release. The upstream range and patched release are summarized in the vulnerability record.
The referenced patch is commit 7b26a42b525735e4085d2e994e13802ea339d5f9. At a high level, the reported correction incorporates tarfile.data_filter rather than relying on first-component stripping alone.
Treat setuptools remediation as an independent workstream. Determine whether its vendored copy contains the vulnerable implementation and obtain authoritative release guidance for the installed setuptools distribution. Until that boundary is known, neither a patched standalone package nor an unverified general setuptools upgrade should be represented as confirmed remediation for the private copy.
If an immediate upgrade is impossible, use layered compensating controls.
Stop untrusted archives from reaching the path
The strongest temporary control is to disable the affected import or extraction feature or restrict it to archives from a controlled, authenticated, immutable source.
Treat “trusted” as a property to verify rather than a label. An internal repository may still be attacker-influenced if users can replace objects, redirects can alter downloads, another tenant can write to the same storage, or the producing system can be compromised.
Enforce destination containment
For each member:
- Apply the same path transformations that extraction will use.
- Normalize or resolve the candidate destination.
- Verify that the destination remains below the intended extraction root.
- Reject the member if containment cannot be established.
Apply this check at every nested extraction stage. Do not rely only on deleting a leading directory, searching for a literal traversal substring, or validating the outer archive while trusting an inner one automatically.
Isolate extraction
Run extraction in a dedicated temporary area separated from application source, configuration, credentials, startup directories, deployment artifacts, and shared host paths. Prefer narrowly scoped mounts and avoid unnecessary host-filesystem access.
After extraction, move only expected and validated outputs into their final locations. This reduces the destinations an escaped path can reach and limits dangerous trust transitions.
Reduce privileges
Use a minimally privileged extraction identity and restrict its writable locations to the staging area wherever practical. Read-only filesystems, narrowly scoped volumes, sandboxing, mandatory access controls, or disposable workers may further constrain the effect of an escaped path.
Red Hat specifically recommends avoiding untrusted archives or processing them in an isolated environment with minimal privileges when avoidance is not possible. These controls reduce exposure but do not repair the filtering defect. Red Hat provides the isolation and least-privilege mitigation guidance.
Constrain recursive archive handling
Disable automatic nested extraction when the workflow does not require it. Where recursive processing is necessary, apply the same destination-containment policy at every level and impose appropriate depth, type, size, and resource limits.
Preserve provenance between outer and inner archives so an incident review can determine how an inner archive entered the workflow. These measures provide defense in depth; they do not replace the upstream patch.
Post-exposure review and response priorities
If an affected application has already processed untrusted archives, begin with historical reachability rather than searching for a universal filename.
First establish whether vulnerable code was present at the time of processing. The current environment may be misleading after upgrades, image rotations, or rebuilds. Use retained lockfiles, package inventories, SBOMs, image digests, deployment records, package caches, and release artifacts where available.
For each relevant event, determine:
- the archive and its source;
- the code path and extraction helper used;
- whether the standalone or vendored implementation executed;
- the extraction root;
- the operating-system identity performing extraction;
- applicable container, mount, sandbox, or access-control boundaries;
- whether inner archives were processed later;
- which out-of-root locations the identity could write.
Review the parent of each extraction directory and other process-writable locations for unexpected creation or modification events associated with archive processing. The relevant search area depends on the extraction root, plausible traversal depth, and permissions—not on a universal target path.
Where archives have been retained or quarantined, inspect their member metadata defensively. Look for names that retain parent-directory components after removal of the first directory component. Include nested tar files when the application opens them automatically or sends them to another extraction worker.
Preserve original archives, relevant filesystem metadata, logs, deployment artifacts, and affected images before destructive cleanup where incident-response policy permits. If an unexpected out-of-root file is found, determine whether another service loaded, executed, published, or otherwise trusted it. That secondary action may be more consequential than the escaped write itself.
Do not treat escaped.txt as a universal indicator of compromise. It was a proof-of-concept filename, not an expected attacker convention. The supplied evidence does not define reliable universal filenames, logs, paths, or telemetry for historical exploitation.
Response priorities are:
- Contain or disable untrusted archive ingestion.
- Replace the affected package or vulnerable extraction path.
- Restrict the extraction identity and its writable locations.
- Preserve relevant archives and filesystem evidence.
- Review nested processing and downstream consumers.
- Investigate unexpected out-of-root modifications according to their target and subsequent use.
Frequently asked questions
Which jaraco.context versions are affected by GHSA-58pv-8j8x-9vj2?
The confirmed affected range is jaraco.context >=5.2.0 and <6.1.0. It includes version 5.2.0 and the 6.0.x series. Releases below 5.2.0 are outside the confirmed range, while 6.1.0 is the first patched release. OpenCVE records the two-sided range and fixed version.
Use the complete range rather than interpreting the issue as affecting every release before 6.1.0. If an affected version is present, separately determine whether the application processes attacker-influenced tar content through the vulnerable path.
Does installing an affected version automatically make an application exploitable?
No. Installation establishes that vulnerable code may be present, but exploitation requires attacker-controlled or otherwise untrusted tar content to reach jaraco.context.tarball() or the reported affected vendored behavior. The trigger is processing a malicious tar archive through the affected helper.
An application that never invokes that path is not exposed through the documented trigger. Upgrading remains the preferred response because archive provenance, trust assumptions, and future data flows can change.
Does GHSA-58pv-8j8x-9vj2 affect setuptools, and which setuptools versions are vulnerable?
The advisory reports a vendored implementation under setuptools._vendor.jaraco.context, but the available evidence does not establish an affected setuptools range or identify the first fixed setuptools release. The reported setuptools exposure is documented without release boundaries.
Inspect the installed private copy and determine whether reachable code invokes it. Do not assume that upgrading the separately installed jaraco.context distribution changes source bundled inside setuptools.
Is there a public exploit, and has the vulnerability been exploited in the wild?
Published proof-of-concept evidence demonstrated that archive-supplied content could be written in the parent of the intended extraction directory. This confirms a working path-escape primitive under the tested conditions.
It does not establish malicious exploitation in the wild or prove automatic code execution, credential theft, privilege escalation, denial of service, or access to every filesystem path. Practical impact depends on the extraction root, traversal path, operating-system behavior, process permissions, writable targets, and subsequent application actions. The public vulnerability data distinguishes proof-of-concept status from broader impact claims.
What can I do if I cannot upgrade to jaraco.context 6.1.0 immediately?
Temporarily stop untrusted archives from reaching the vulnerable helper. If processing must continue, verify that every transformed and normalized destination remains beneath the intended extraction root, isolate extraction from sensitive paths, use a minimally privileged identity, and disable unnecessary nested-archive handling.
Investigate any setuptools-vendored copy separately. These controls can reduce reachability and blast radius, but they do not replace upgrading the standalone package to 6.1.0 or later.
The final action sequence is straightforward: verify whether the executed jaraco.context version falls within >=5.2.0 and <6.1.0; confirm whether attacker-influenced tar content reaches tarball() or a vendored equivalent; upgrade the standalone package to 6.1.0 or later while investigating setuptools separately; and, where prior exposure is plausible, review nested-archive workflows and out-of-root locations writable by the extraction process. The flaw has a demonstrated path-escape proof of concept, but deployment risk remains conditional, and the available evidence does not establish active exploitation in the wild.