MediumGHSA-98f2-w9h9-7fp9CVE-2026-29050GO-2026-5279

melange has Path Traversal When Resolving External Pipelines via Unvalidated pipeline[].uses

Published 23 Apr 2026 · Updated 25 Jun 2026

Is your project on an affected chainguard.dev/melange?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
>=0.32.0 <0.43.4
Fixed in
0.43.4
Update to the fixed version for your release line, for example:go get chainguard.dev/melange@v0.43.4

Details

Impact

An attacker who can influence a melange configuration file — for example through pull-request-driven CI or build-as-a-service scenarios — could set pipeline[].uses to a value containing ../ sequences or an absolute path. The (*Compiled).compilePipeline function in pkg/build/compile.go passed uses directly to filepath.Join(pipelineDir, uses + ".yaml") without validating the value, so the resolved path could escape each --pipeline-dir and read an arbitrary YAML-parseable file visible to the melange process. Because the loaded file is subsequently interpreted as a melange pipeline and its runs: block is executed via /bin/sh -c in the build sandbox, this additionally allowed shell commands sourced from an out-of-tree file to run during the build, bypassing the review boundary that normally covers the in-tree pipeline definition.

Patches

Fixed in melange v0.43.4 via commit 5829ca4. The fix rejects uses values that are absolute paths or contain .., and verifies (via filepath.Rel after filepath.Clean) that the resolved target remains within the pipeline directory.

Workarounds

Only run melange build against configuration files from trusted sources. In CI systems that build user-supplied melange configs, gate builds behind manual review of pipeline[].uses values and reject any containing .. or leading /.

Credits

melange thanks Oleh Konko (@1seal from 1seal.org) for discovering and reporting this issue.

Is GHSA-98f2-w9h9-7fp9 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected chainguard.dev/melange, and gives you the command that fixes it.

More advisories for chainguard.dev/melange

  • LowCVE-2026-54174melange: Incomplete package integrity verification allows data section substitution in chainguard.dev/apko · 17 Jul 2026
  • HighCVE-2026-54174melange: Incomplete package integrity verification allows data section substitution · 10 Jul 2026
  • LowCVE-2026-29051melange has Path Traversal via .PKGINFO in --persist-lint-results in chainguard.dev/melange · 25 Jun 2026
  • LowCVE-2026-29051melange has Path Traversal via .PKGINFO in --persist-lint-results · 23 Apr 2026
  • LowCVE-2026-29049`melange update-cache` has unbounded HTTP download that can exhaust disk in CI in chainguard.dev/melange · 10 Mar 2026
  • MediumCVE-2026-29049`melange update-cache` has unbounded HTTP download that can exhaust disk in CI · 2 Mar 2026
All 17 advisories for chainguard.dev/melange

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.