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-29051 has been found in chainguard.dev/melange.
Attackers can target a specific entry point like arch over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
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-29051" on the vendor's site.
CVE-2026-29051 (chainguard.dev/melange) — CWE-22
Attack vector: local / unauthenticated
Attack surface: arch / pkgname / filepath.Separator
Patched: 0.43.4 — apply immediately
Workaround: Do not pass --persist-lint-results when linting or building APKs whose .PKGINFO contents are not fully trusted.
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 arch without authentication.
Check the vendor advisory for the affected versions of chainguard.dev/melange. Attack surface: arch / pkgname / filepath.Separator.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 0.43.4.
Workaround: Do not pass --persist-lint-results when linting or building APKs whose .PKGINFO contents are not fully trusted.
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
Do not pass `--persist-lint-results` when linting or building APKs whose `.PKGINFO` contents are not fully trusted.パッチが適用されるまでの応急処置として、Do not pass
--persist-lint-resultswhen linting or building APKs whose.PKGINFOcontents are not fully trusted. を実施。回避策の副作用 (機能低下) を確認した上で。 -
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, 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---r.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.
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
- patch security-advisories@github.com