SecurityContext

CVE-2026-29050: melange - Command Injection & Path Traversal

  • Cve: CVE-2026-29050
  • Name: melange - Command Injection & Path Traversal
  • Description: 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 `/`.
  • Impact: Attackers can execute arbitrary shell commands during build, potentially compromising the build environment and bypassing review controls.
  • Remediation: Update to version 0.43.4 or later.
  • Vulnerability type: path_traversal
  • Vulnerability impact: remote_code_execution
  • Requirement type: logged_in
  • Requirements: Attacker must control or influence melange configuration files
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 6.1
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
  • Epss score: 0.00145
  • Epss percentile: 0.03743
  • Assignee: [email protected]
  • Published at: 2026-04-24T00:16:27Z
  • Age in days: 214
  • Modified at: 2026-10-26T22:10:00Z
  • Patch available: yes
  • References total: 1
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-29050
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-22Improper Limitation of a Pathname to a Restricted Directory

References

UrlSourceTags
https://github.com/chainguard-dev/melange/security/advisories/GHSA-98f2-w9h9-7fp9nvdMitigation, Patch, Vendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
chainguard:melange>= 0.32.0, < 0.43.4nonvd/v1/products/chainguard/melange

Projects

RepositoryLink kindsIndexedUrl
chainguard-dev/melangecommit, package, security_advisoryyes/v1/repositories/chainguard-dev/melange

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts