HighGHSA-rf4g-89h5-crcrCVE-2026-25143GO-2026-4412

melange affected by potential host command execution via license-check YAML mode patch pipeline

Published 4 Feb 2026 · Updated 10 Sept 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.10.0 <0.40.3
Fixed in
0.40.3
Update to the fixed version for your release line, for example:go get chainguard.dev/melange@v0.40.3

Details

An attacker who can influence inputs to the patch pipeline could execute arbitrary shell commands on the build host. The patch pipeline in pkg/build/pipelines/patch.yaml embeds input-derived values (series paths, patch filenames, and numeric parameters) into shell scripts without proper quoting or validation, allowing shell metacharacters to break out of their intended context.

The vulnerability affects the built-in patch pipeline which can be invoked through melange build and melange license-check operations. An attacker who can control patch-related inputs (e.g., through pull request-driven CI, build-as-a-service, or by influencing melange configurations) can inject shell metacharacters such as backticks, command substitutions $(…), semicolons, pipes, or redirections to execute arbitrary commands with the privileges of the melange build process.

Fix: Fixed in bd132535 , Released in 0.40.3.

Acknowledgements

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

Is GHSA-rf4g-89h5-crcr 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-29050melange has Path Traversal When Resolving External Pipelines via Unvalidated pipeline[].uses in chainguard.dev/melange · 25 Jun 2026
  • LowCVE-2026-29051melange has Path Traversal via .PKGINFO in --persist-lint-results · 23 Apr 2026
  • MediumCVE-2026-29050melange has Path Traversal When Resolving External Pipelines via Unvalidated pipeline[].uses · 23 Apr 2026
All 17 advisories for chainguard.dev/melange

References

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