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

Published Apr 14, 2026
·
Updated

### 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:** ```go outputPath := filepath.Join(o.outputDir, pkgLayout.Pkg.Metadata.Name) err = pkgLayout.GetSBOM(ctx, outputPath) ``` **Documentation inspection (line 1219):** ```go 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.d/malicious` or `/home/user/.ssh/authorized_keys`. ### CVSS Explainations #### Attack Vector Verdict: Network A malicious package could be published to OCI and inspected directly with `zarf package inspect sbom oci://<bad-package>` #### Attack Complexity Verdict: Low It is not complicated to make and publish a malicious package. The Attacker only needs to edit the zarf.yaml and sboms.tar then edit the checksums. #### Privileges Required Verdict: None The attacker is relying on the runner of `zarf package inspect sbom|documentation` and needs no other privileges. #### User Interaction Verdict: Required The user must run the inspect command #### Scope Verdict: Unchanged The vulnerability operates entirely within the permissions of the user running zarf package inspect. The file write can't escape the privilege boundary of that user #### Confidentiality Verdict: None This is an arbitrary file write vulnerability. The attacker can place or overwrite files on the filesystem but the vulnerability does not provide any mechanism to read or exfiltrate data from the target system. #### Integrity Verdict: High The attacker controls both the file path (via Metadata.Name) and the file content (via the SBOM or documentation files inside the archive). This allows writing attacker-controlled content to arbitrary locations on the filesystem, limited only by the permissions of the user running the inspect command. Realistic exploitation includes writing SSH authorized_keys, cron jobs, or shell profiles. ### Availability Verdict: Low The vulnerability does not directly target service availability. However, an attacker could overwrite files that cause system disruption.

Affected Software

2 affected componentsFixes available
go/github.com/zarf-dev/zarf>=0.23.0<0.74.2
0.74.2
Lfprojects Zarf>=0.23.0<0.74.2

Event History

Apr 14, 2026
Advisory Published
via GitHub·10:32 PM
Data Sourced
via GitHub·10:32 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·11:46 PM
Data Sourced
via MITRE·11:46 PM
DescriptionSeverityWeakness
Apr 15, 2026
Data Sourced
via NVD·04:17 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the impact of CVE-2026-40090?

CVE-2026-40090 affects users inspecting untrusted packages with 'zarf package inspect sbom' or 'zarf package inspect documentation'.

2

How do I fix CVE-2026-40090?

You can fix CVE-2026-40090 by updating to zarf version 0.74.2 or later.

3

What is the recommended workaround for CVE-2026-40090?

The recommended workaround for CVE-2026-40090 is to avoid inspecting unsigned packages.

4

Which versions of zarf are affected by CVE-2026-40090?

CVE-2026-40090 affects versions of zarf between 0.23.0 and 0.74.1.

5

Is CVE-2026-40090 a critical vulnerability?

CVE-2026-40090 is considered a serious vulnerability due to its impact on security when handling untrusted packages.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203