CVE-2026-40090

Zarf has a Path Traversal via Malicious Package Metadata.Name — Arbitrary File Write

Published Apr 14, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
Description
Zarf is an Airgap Native Packager Manager for Kubernetes. Versions 0.23.0 through 0.74.1 contain an arbitrary file write vulnerability in the zarf package inspect sbom and zarf package inspect documentation subcommands. These subcommands output file paths are constructed by joining a user-controlled output directory with the package's Metadata.Name field read directly from the untrusted package's zarf.yaml manifest. Although Metadata.Name is validated against a regex on package creation, an attacker can unarchive a package to modify the Metadata.Name field to contain path traversal sequences such as ../../etc/cron.d/malicious or absolute paths like /home/user/.ssh/authorized_keys, along with the corresponding files inside SBOMS.tar. This allows writing attacker-controlled content to arbitrary filesystem locations within the permissions of the user running the inspect command. This issue has been fixed in version 0.74.2.

Analysis

AI-generated

Technical impact

A malicious Zarf package can embed path traversal sequences in its Metadata.Name field, allowing the inspect subcommands to construct file paths that escape the intended output directory. The vulnerability enables an attacker to write arbitrary files with the permissions of the user executing the inspect command, potentially replacing or creating system configuration files such as cron jobs or SSH keys. This flaw, classified as CWE-22, results in uncontrolled file write, with confidentiality, integrity, and availability risks arising from the ability to modify critical system files.

Affected Systems

The issue affects Zarf version 0.23.0 through 0.74.1, inclusive. All deployments of the Zarf Airgap Native Packager Manager utilizing the package inspect sbom or documentation subcommands are susceptible when processing untrusted packages. The vulnerability persists until the release of version 0.74.2, which contains the fix.

Risk and Exploitability

The CVSS score of 7.1 reflects a moderate to high severity. Because exploitation requires the attacker to have local access to a machine running the inspect command, the EPSS score is noted as not available, and the vulnerability is not listed in the CISA KEV catalog. Attackers can influence the system by executing a crafted package during inspection, which only requires user-level privileges. The risk is significant for environments where unsanitized packages are inspected or where the inspection process runs under privileged accounts.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Zarf release (v0.74.2 or newer) to eliminate the flaw.
  • If updating is not immediately possible, restrict the use of `zarf package inspect` to trusted packages only and run the command with the lowest-privilege user.
  • Implement a monitoring mechanism to detect unexpected file writes in critical directories (e.g., /etc, /.ssh, /var/spool/cron) following inspection operations.

Generated by OpenCVE AI on April 15, 2026 at 01:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pj97-4p9w-gx3q Zarf has a Path Traversal via Malicious Package Metadata.Name — Arbitrary File Write
History
Type Values Removed Values Added
First Time appeared Lfprojects
Lfprojects zarf
CPEs cpe:2.3:a:lfprojects:zarf:*:*:*:*:*:*:*:*
Vendors & Products Lfprojects
Lfprojects zarf
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Zarf-dev
Zarf-dev zarf
Vendors & Products Zarf-dev
Zarf-dev zarf
Type Values Removed Values Added
Description Zarf is an Airgap Native Packager Manager for Kubernetes. Versions 0.23.0 through 0.74.1 contain an arbitrary file write vulnerability in the zarf package inspect sbom and zarf package inspect documentation subcommands. These subcommands output file paths are constructed by joining a user-controlled output directory with the package's Metadata.Name field read directly from the untrusted package's zarf.yaml manifest. Although Metadata.Name is validated against a regex on package creation, an attacker can unarchive a package to modify the Metadata.Name field to contain path traversal sequences such as ../../etc/cron.d/malicious or absolute paths like /home/user/.ssh/authorized_keys, along with the corresponding files inside SBOMS.tar. This allows writing attacker-controlled content to arbitrary filesystem locations within the permissions of the user running the inspect command. This issue has been fixed in version 0.74.2.
Title Zarf has a Path Traversal via Malicious Package Metadata.Name — Arbitrary File Write
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 15, 2026, 4:13 PM
Reserved
Apr 9, 2026, 12:39 AM
Status
Analyzed
Published
Apr 15, 2026, 4:17 AM
Modified
Jun 17, 2026, 10:44 AM