# CVE-2026-29051: GO-2026-5562 - melange has Path Traversal via .PKGINFO in --persist-lint-results in chainguard.dev/melange

Source: https://junglewise.ai/threats/cve-2026-29051-melange-has-path-traversal-via-pkginfo-in-persist-lint-results  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-24  
License: CC BY 4.0 with a link back

CVE-2026-29051 · Severity: medium · CVSS 4.4 · Published 2026-04-24

melange allows users to build apk packages using declarative pipelines. Starting in version 0.32.0 and prior to version 0.43.4, `melange lint --persist-lint-results` (opt-in flag, also usable via `melange build --persist-lint-results`) constructs output file paths by joining `--out-dir` with the `arch` and `pkgname` values read from the `.PKGINFO` control file of the APK being linted. In affected versions these values were not validated for path separators or `..` sequences, so an attacker who can supply an APK to a melange-based lint/build pipeline (e.g. CI that lints third-party APKs, or build-as-a-service) could cause melange to write `lint-<pkgname>-<pkgver>-r<epoch>.json` to an arbitrary `.json` path reachable by the melange process. The written file is a JSON lint report whose content is partially attacker-influenced. There is no direct code-execution path, but the write can clobber other JSON artifacts on the filesystem. The issue only affects deployments that explicitly pass `--persist-lint-results`; the flag is off by default. The issue is fixed in melange v0.43.4 by validating `arch` and `pkgname` for `..`, `/`, and `filepath.Separator` before path construction in `pkg/linter/results.go` (commit 84f3b45). As a workaround, do not pass `--persist-lint-results` when linting or building APKs whose `.PKGINFO` contents are not fully trusted. Running melange as a low-privileged user and confining writes to an isolated directory also limits impact.

Technologies: [Chainguard Melange](https://junglewise.ai/threats/technologies/melange), [chainguard.dev/melange (Go)](https://junglewise.ai/threats/technologies/chainguard-dev-melange). Vendors: [Chainguard](https://junglewise.ai/threats/vendors/chainguard), [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-29051 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-29051 being exploited in the wild.

**How severe is CVE-2026-29051?** Medium severity, with a CVSS score of 4.4, published 24 April 2026.

**Which products and versions are affected?** chainguard.dev/melange (Go) SEMVER:introduced=0.32.0,fixed=0.43.4.

**Is there a fix for CVE-2026-29051?** Yes. chainguard.dev/melange (Go): upgrade to 0.43.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-29051?** Check whether you run Chainguard Melange or chainguard.dev/melange (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- chainguard.dev/melange (Go): upgrade to 0.43.4 or later

  ```sh
  go get chainguard.dev/melange@v0.43.4
  ```


## Affected products

- Chainguard Melange
- chainguard.dev/melange (Go) SEMVER:introduced=0.32.0,fixed=0.43.4

## Identifiers

- CVE-2026-29051
- GHSA-q2pw-xx38-p64j
- GO-2026-5562

## Related threats

- [Chainguard Melange and Apko incomplete package integrity verification](https://junglewise.ai/threats/cve-2026-54174-chainguard-melange-and-apko-incomplete-package-integrity)
- [melange has Path Traversal When Resolving External Pipelines via Unvalidated pipeline[].uses](https://junglewise.ai/threats/cve-2026-29050-melange-has-path-traversal-when-resolving-external-pipelines-via)
- [Chainguard melange resource exhaustion in update-cache](https://junglewise.ai/threats/cve-2026-29049-chainguard-melange-resource-exhaustion-in-update-cache)
- [melange affected by potential host command execution via license-check YAML mode patch pipeline](https://junglewise.ai/threats/cve-2026-25143-melange-affected-by-potential-host-command-execution-via-license)
- [melange has a path traversal in license-path which allows reading files outside workspace](https://junglewise.ai/threats/cve-2026-25145-melange-has-a-path-traversal-in-license-path-which-allows-reading)
