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

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

- **Severity:** High 7.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L`)
- **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:** Yes
- **Published:** 14 Apr 2026
- **Updated:** 15 Apr 2026
- **Also known as:** GHSA-pj97-4p9w-gx3q, GO-2026-5542

## 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 (Improper Limitation of a Pathname to a Restricted Directory)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/zarf-dev/zarf` | Go | From 0.23.0 | 0.74.2 |
| `github.com/zarf-dev/zarf` | Go | From 0.23.0 | 0.74.2 |
| `github.com/zarf-dev/zarf` | Go | From 0.37.0 | 0.74.2 |
| `github.com/defenseunicorns/zarf` | Go | From 0.23.0 | None |

Products: Lfprojects Zarf.

## How do I fix CVE-2026-40090?

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

## Is CVE-2026-40090 being exploited?

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

## Other vulnerabilities in zarf-dev zarf

- [CVE-2026-29064](https://insights.sbomify.com/CVE-2026-29064/): Zarf: Symlink targets in archives are not validated against destination directory (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40090 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-40090 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/zarf-dev/zarf (Go): affected from 0.23.0; fixed in 0.74.2
- github.com/zarf-dev/zarf (Go): affected from 0.23.0; fixed in 0.74.2
- github.com/zarf-dev/zarf (Go): affected from 0.37.0; fixed in 0.74.2
- github.com/defenseunicorns/zarf (Go): affected from 0.23.0; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40090/ (Markdown: https://insights.sbomify.com/CVE-2026-40090/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40090
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40090
- OSV: https://osv.dev/vulnerability/CVE-2026-40090

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40090/
Summaries are generated and may contain mistakes; the official description above is the record.
