# CVE-2026-29050: melange has Path Traversal When Resolving External Pipelines via Unvalidated pipeline[].uses

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-04-23T21:53:33.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-98f2-w9h9-7fp9, GO-2026-5279
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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 `/`.

(As written by CVE List.)

## Affected

- chainguard-dev melange: >= 0.32.0, < 0.43.4
- chainguard.dev/melange (Go): from 0.32.0 before 0.43.4
- chainguard melange: from 0.32.0 before 0.43.4

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`

## References

- <https://github.com/chainguard-dev/melange/security/advisories/GHSA-98f2-w9h9-7fp9> (advisory, mitigation, patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-29050> (advisory)
- <https://github.com/chainguard-dev/melange/commit/5829ca45cfe14dfeb73ffb716992db3b1b7892ac> (web)
- <https://github.com/chainguard-dev/melange> (package)

## Sources

- CVE List: [CVE-2026-29050](https://www.cve.org/CVERecord?id=CVE-2026-29050), CVE Terms of Use, modified 2026-04-25
- GitHub Advisory Database: [GHSA-98f2-w9h9-7fp9](https://github.com/advisories/GHSA-98f2-w9h9-7fp9), CC-BY-4.0, modified 2026-06-25
- Go Vulnerability Database: [GO-2026-5279](https://pkg.go.dev/vuln/GO-2026-5279), CC-BY-4.0, modified 2026-06-25
- NVD: [CVE-2026-29050](https://nvd.nist.gov/vuln/detail/CVE-2026-29050), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-29050 · Whole record: https://cve.day/CVE-2026-29050.json · Rebuilt by cve.day 2026-11-25T22:59:19.440Z
