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

High 7.1 Published Updated

Attackers can write arbitrary files via path traversal in Zarf package inspection, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-40090?

CVE-2026-40090 is a high-severity path traversal vulnerability in zarf-dev zarf, published on 14 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-22

Which versions are affected by CVE-2026-40090?

4 open source packages ship an affected version, including github.com/zarf-dev/zarf and github.com/defenseunicorns/zarf. It affects 1 product.

PackageAffectedFixed in
github.com/zarf-dev/zarf GoFrom 0.23.00.74.2
github.com/zarf-dev/zarf GoFrom 0.23.00.74.2
github.com/zarf-dev/zarf GoFrom 0.37.00.74.2
github.com/defenseunicorns/zarf GoFrom 0.23.0None

Products include Lfprojects Zarf.

How do I fix CVE-2026-40090?

Upgrade github.com/zarf-dev/zarf to 0.74.2 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40090 being exploited?

There is no known exploitation of CVE-2026-40090 in the wild and no public exploit code.

Sources

Also known as GHSA-pj97-4p9w-gx3q, GO-2026-5542.

Is CVE-2026-40090 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free