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

Published Apr 23, 2026
·
Updated

Impact

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.

Patches

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.

Workarounds

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

Credits

melange thanks Oleh Konko (@1seal from 1seal.org) for discovering and reporting this issue.

Other sources

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

— MITRE

Affected Software

2 affected componentsFixes available
go/chainguard.dev/melange>=0.32.0<0.43.4
0.43.4
chainguard Melange Go>=0.32.0<0.43.4

Event History

Apr 23, 2026
Advisory Published
via GitHub·09:53 PM
Data Sourced
via GitHub·09:53 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·11:58 PM
Data Sourced
via MITRE·11:58 PM
DescriptionSeverityWeakness
Apr 24, 2026
Data Sourced
via NVD·12:16 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-29050?

The severity of CVE-2026-29050 is medium, rated at 6.1.

2

How do I fix CVE-2026-29050?

You can mitigate CVE-2026-29050 by applying the available patch.

3

What type of vulnerability is CVE-2026-29050?

CVE-2026-29050 is a Path Traversal vulnerability.

4

Who is affected by CVE-2026-29050?

CVE-2026-29050 affects users of the melange software by Chainguard.

5

What can an attacker do with CVE-2026-29050?

An attacker can influence a melange configuration file to execute arbitrary code by manipulating the pipeline[].uses path.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203