Path Traversal in chainguard.dev/melange
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-29050 has been found in chainguard.dev/melange.
Attackers can target a specific entry point like uses over the network to misuse the product.
Confidential information can be exposed externally.
What to do: upgrade chainguard.dev/melange to 0.43.4 or later.
If unsure, ask your IT team or search "chainguard.dev/melange CVE-2026-29050" on the vendor's site.
CVE-2026-29050 (chainguard.dev/melange) — CWE-22
Attack vector: local / unauthenticated
Attack surface: uses / filepath.Rel / filepath.Clean
Patched: 0.43.4 — apply immediately
Workaround: Only run melange build against configuration files from trusted sources.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in chainguard.dev/melange. Attackers reach the vulnerable code path via uses without authentication.
Check the vendor advisory for the affected versions of chainguard.dev/melange. Attack surface: uses / filepath.Rel / filepath.Clean.
Severity: ?. Confidential information can be exposed externally.
Update to 0.43.4.
Workaround: Only run melange build against configuration files from trusted sources.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'chainguard.dev/melange' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'chainguard.dev/melange' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
chainguard.dev/melangeを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply temporary workaroundmitigate
Only run `melange build` against configuration files from trusted sources.パッチが適用されるまでの応急処置として、Only run
melange buildagainst configuration files from trusted sources. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3
Apply patchpatch
Upgrade chainguard.dev/melange to 0.43.4ステージング環境で 0.43.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Gochainguard.dev/melange |
≥ 0.32.0, < 0.43.4→ 0.43.4 |
0.43.4 |
Original description The description as published by the source.
melange allows users to build apk packages using declarative pipelines. Starting in version 0.32.0 and prior to version 0.43.4, 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. The issue is 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. As a workaround, 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 /.
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
References
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch security-advisories@github.com
- web github.com