/

CVE-2026-29064

Severity:

HIGH RISK

(8.2)

Path Traversal in Zarf Package Handling

CVE-2026-29064

Analyzed

Vulnerability type

Category:

Path Traversal / Directory Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read/Write on the Host System

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Zarf's archive extraction logic allows crafted packages to create symlinks that point outside the intended destination directory.

When such a package is processed, these symlinks can be abused to read from or write to arbitrary files on the host system handling the Zarf package, potentially compromising its integrity and confidentiality.

Affected context

The vulnerability occurs during extraction of Zarf packages in environments running affected versions (0.54.0 to before 0.73.1).

It is relevant wherever Zarf is used to process packages, especially on systems that treat Zarf packages as trusted input or run package processing with elevated privileges.

The issue manifests when archive contents are not fully constrained to the target extraction directory, and symlinks or paths inside the package can reference filesystem locations outside that directory.

Exploit preconditions

  • Attack surface: The Zarf package extraction mechanism on systems that ingest and unpack Zarf packages.
  • Required access: Ability to supply or influence a Zarf package that will be processed by an affected Zarf instance (e.g., publishing or delivering a crafted package).
  • Trigger point: The vulnerable code path is reached when the Zarf package is unpacked, and filesystem entries (including symlinks) are created or followed.
  • Why exploitation is possible: The extraction logic does not fully validate or constrain symlink targets and path components to remain within the intended destination directory, allowing traversal to arbitrary filesystem locations.

Why this happens

The root cause is insufficient validation of file paths and symlink targets during archive extraction, corresponding to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

When processing a package, the extraction routine trusts the paths embedded in the archive and allows entries to create symlinks that reference locations outside the designated extraction directory.

Because these paths are not normalized and checked against the target root, an attacker-controlled package can cause the tool to interact with files elsewhere on the filesystem, enabling unauthorized reads or writes.

Potential impact

  • Arbitrary file read on the system processing the package, potentially exposing sensitive configuration files, credentials, or secrets.
  • Arbitrary file write, which could modify configuration, inject malicious data, or corrupt application state.
  • Escalation of impact if Zarf extraction runs under a privileged account, potentially affecting system-wide resources.
  • Facilitation of further attacks, such as tampering with Kubernetes-related config files, manifests, or container runtime settings.

General mitigation guidance

Risk reduction typically focuses on constraining archive extraction to a well-defined directory tree and treating package contents as untrusted input:

  • Normalize and validate all archive entry paths before creation, ensuring they resolve within the intended destination directory.
  • Reject or sanitize entries that use absolute paths, parent-directory references (e.g., ../), or symlink targets pointing outside the extraction root.
  • Implement extraction routines that never automatically follow or dereference symlinks during setup steps that interact with the host filesystem.
  • Run package processing with least-privilege accounts and minimal filesystem access, limiting the blast radius of any misbehavior.
  • Use separate, isolated directories (e.g., chroot-like or containerized environments) for processing untrusted or third-party packages.

How teams detect issues like this

Effective detection can combine code-level analysis with operational monitoring:

  • Static analysis and manual code review focused on archive extraction code paths, checking for robust path normalization, symlink handling, and directory confinement.
  • Security linting rules or SAST tools that flag use of file operations on archive-derived paths without explicit validation against a base directory.
  • Tests or CI pipelines that include adversarial archives (with nested ../ segments, absolute paths, and symlinks) to validate extraction safety.
  • Runtime monitoring of tools that process packages for suspicious file accesses outside designated working directories, especially on build or deployment hosts.

Sources

SourceLink
github.comgithub.com/zarf-dev/zarf/releases/tag/v0.73.1
github.comgithub.com/zarf-dev/zarf/security/advisories/GHSA-hcm4-6hpj-vghm

Frequently asked

questions

It can be remotely exploitable if an attacker can deliver a crafted Zarf package to a system that automatically or routinely processes such packages, for example via a CI/CD pipeline or artifact repository. The actual extraction still occurs locally on the host running Zarf.

An attacker needs the ability to create, modify, or influence a Zarf package that will be processed by an affected Zarf instance. Direct shell access is not required; control over the package contents is sufficient.

The safest pattern is to strictly confine all extracted paths to a designated directory: normalize paths, resolve symlinks, and reject any entry that escapes the target root. Additionally, avoid using symlink targets from packages for operations that affect the broader host filesystem.

Future prevention relies on treating all archive contents as untrusted, applying path canonicalization and validation, adding regression tests for malicious archives, and enforcing least privilege for any service that processes packages. Security review of file-handling logic should be a standard part of the development and release process for packaging tools.

Find out what's already
exploitable in your codebase.