CVE-2026-29050 Details
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 `/`.
A path traversal vulnerability has been identified in Melange, a tool for building APK packages using declarative pipelines. This issue affects versions 0.32.0 prior to 0.43.4. The vulnerability arises when an attacker can manipulate a Melange configuration file, such as in pull-request-driven CI or build-as-a-service scenarios. The attacker could exploit the 'pipeline[].uses' field by inserting '../' sequences or absolute paths. The 'compilePipeline' function in 'pkg/build/compile.go' improperly validated these 'uses' values, allowing the resolved path to escape the designated pipeline directories and access arbitrary YAML-parseable files visible to the Melange process. Once loaded, the file is treated as a Melange pipeline, and its 'runs:' block is executed via '/bin/sh -c' in the build sandbox. This execution bypasses the usual review process for in-tree pipeline definitions, enabling unauthorized shell commands from out-of-tree files to run during the build.
Users can upgrade to Melange version 0.43.4, where this vulnerability has been fixed. In CI systems that build user-supplied Melange configurations, it is recommended to manually review 'pipeline[].uses' values and reject any that contain '../' or absolute paths.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 25, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/chainguard-dev/melange/security/advisories/GHSA-98f2-w9h9-7fp9 | [email protected] | MitigationPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| chainguard melange | >= 0.32.0, < 0.43.4 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 27, 2026 | Initial Analysis | [email protected] |
| Apr 24, 2026 | New CVE Received | [email protected] |