Path Traversal in github.com/defenseunicorns/zarf (CVE-2026-40090)
Summary
Path traversal in github.com/defenseunicorns/zarf (CVE-2026-40090). Data can be tampered with by attackers. Exploitable via Metadata.Name. Mitigation: upgrade to 0.74.2 or later.
Original description
The description as published by the source.
Impact
This vulnerability impacts users of zarf package inspect sbom or zarf package inspect documentation on untrusted packages.
Patches
#4793, now fixed in version v0.74.2
Workarounds
Avoid inspecting unsigned packages
Description
The package inspect sbom and package inspect documentation subcommands construct output file paths by joining a user-controlled output directory with the package's Metadata.Name field, which is attacker-controlled data read from the package archive. The Metadata.Name field is validated against a regex on create, ^[a-z0-9][a-z0-9\-]*$, however a malicious user could unarchive a package to change the .Metadata.Name field and the files inside the SBOMS.tar. This would lead to arbitrary file write in a location of the attackers choosing.
Neither location sanitizes or validates the package name before using it in the file path.
SBOM inspection:
outputPath := filepath.Join(o.outputDir, pkgLayout.Pkg.Metadata.Name)
err = pkgLayout.GetSBOM(ctx, outputPath)
Documentation inspection (line 1219):
outputPath := filepath.Join(o.outputDir, fmt.Sprintf("%s-documentation", pkgLayout.Pkg.Metadata.Name))
return pkgLayout.GetDocumentation(ctx, outputPath, o.keys)
pkgLayout.Pkg.Metadata.Name is read directly from the untrusted package's zarf.yaml manifest. An attacker can craft a malicious Zarf package where Metadata.Name contains path traversal sequences or root paths such as `../../etc/cron.…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-40090 has been found in github.com/defenseunicorns/zarf.
Attackers can target a specific entry point like Metadata.Name over the network to misuse the product.
Data can be tampered with by attackers.
What to do: upgrade github.com/defenseunicorns/zarf to 0.74.2 or later.
If unsure, ask your IT team or search "github.com/defenseunicorns/zarf CVE-2026-40090" on the vendor's site.
CVE-2026-40090 (github.com/defenseunicorns/zarf) — CWE-22
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: Metadata.Name / pkgLayout.Pkg.Metadata.Name / zarf.yaml
Patched: 0.74.2 — apply immediately
Workaround: Avoid inspecting unsigned packages
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in github.com/defenseunicorns/zarf. Attackers reach the vulnerable code path via Metadata.Name without authentication.
Check the vendor advisory for the affected versions of github.com/defenseunicorns/zarf. Attack surface: Metadata.Name / pkgLayout.Pkg.Metadata.Name / zarf.yaml.
Severity: ?. Data can be tampered with by attackers.
Update to 0.74.2.
Workaround: Avoid inspecting unsigned packages
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/defenseunicorns/zarf' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'github.com/defenseunicorns/zarf' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/defenseunicorns/zarfを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Avoid inspecting unsigned packagesパッチが適用されるまでの応急処置として、Avoid inspecting unsigned packages を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade github.com/defenseunicorns/zarf to 0.74.2ステージング環境で 0.74.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com