Skip to content
Medium 4.4

Path Traversal in chainguard.dev/melange

CVE-2026-29051 First seen on SecPulse

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.

What is the problem

Path traversal (CWE-22) exists in chainguard.dev/melange. Attackers reach the vulnerable code path via arch without authentication.

Affected scope

Check the vendor advisory for the affected versions of chainguard.dev/melange. Attack surface: arch / pkgname / filepath.Separator.

Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

How to fix

Update to 0.43.4.

Workaround

Workaround: Do not pass --persist-lint-results when linting or building APKs whose .PKGINFO contents are not fully trusted.

Detection

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. 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. 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-results when linting or building APKs whose .PKGINFO contents are not fully trusted. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patchpatch
    Upgrade chainguard.dev/melange to 0.43.4

    ステージング環境で 0.43.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
Gochainguard.dev/melange
≥ 0.32.0, < 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

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details