melange has a path traversal in license-path which allows reading files outside workspace
Published 4 Feb 2026 · Updated 10 Sept 2026
Is your project on an affected chainguard.dev/melange?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=0.14.0 <0.40.3
- Fixed in
- 0.40.3
go get chainguard.dev/melange@v0.40.3Details
An attacker who can influence a melange configuration file (e.g., through pull request-driven CI or build-as-a-service scenarios) could read arbitrary files from the host system. The LicensingInfos function in pkg/config/config.go reads license files specified in copyright[].license-path without validating that paths remain within the workspace directory, allowing path traversal via ../ sequences. The contents of the traversed file are embedded into the generated SBOM as license text, enabling exfiltration of sensitive data through build artifacts.
Fix: Merged in commit 2f95c9f4
Acknowledgements
melange thanks Oleh Konko (@1seal) from 1seal for discovering and reporting this issue.
Is GHSA-2w4f-9fgg-q2v9 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
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.