Skip to main content

melange CVE-2026-29050

MEDIUM
Path Traversal (CWE-22)
2026-04-23 https://github.com/chainguard-dev/melange GHSA-98f2-w9h9-7fp9
6.1
CVSS 3.1 · Vendor: https://github.com/chainguard-dev/melange
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit PR with malicious pipeline[].uses value
  2. Delivery
    CI auto-triggers melange build on PR branch
  3. Exploit
    Unvalidated uses value resolves outside pipeline directory
  4. Execution
    Melange loads attacker-specified YAML file
  5. Persist
    runs: block executed via /bin/sh -c in build sandbox
  6. Impact
    Exfiltrate CI secrets or execute arbitrary attacker commands

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to be able to influence the content of a melange configuration file that is subsequently processed by melange build - the canonical scenario is a pull-request-driven CI system or a build-as-a-service platform where user-submitted melange configs are built without manual review of pipeline[].uses values. A build trigger must occur (UI:R), meaning fully automated pipelines that process untrusted PRs without a human review gate are most exposed. Exploitation is bounded by: (1) the melange build sandbox, which constrains but does not eliminate the impact of arbitrary shell execution; (2) the requirement for the CI system to process the malicious config without prior pipeline[].uses inspection; (3) the attacker needing the target file to be YAML-parseable and visible to the melange process for the file-read primitive to yield useful data; and (4) affected versions being limited to >= 0.32.0 per the vendor advisory.

Impact

Real-world risk is moderate-to-high specifically for organizations operating pull-request-driven CI or build-as-a-service pipelines using melange. The vendor-assigned CVSS 6.1 (AV:L) reflects a conservative framing where the attacker has local file access, but the advisory's primary threat scenario - an attacker submitting a malicious PR that is automatically built by CI - implies a network-accessible attack surface that AV:L underrepresents. EPSS at 0.01% (2nd percentile) and SSVC exploitation 'none' confirm no observed in-the-wild exploitation. SSVC rates the issue as 'not automatable' (build trigger required) and 'partial' technical impact, though arbitrary shell execution during a trusted build pipeline arguably exceeds 'partial' - this is a discrepancy worth flagging: SSVC may be anchored on the sandbox constraint while the advisory text emphasizes the bypass of the review boundary. The key risk amplifier is deployment context: teams that auto-build contributor PRs without reviewing pipeline[].uses face effective remote code execution in their CI environment. Organizations not using melange in any CI capacity face negligible risk.

Exploit ScenarioDerived

An attacker submits a pull request adding a pipeline[].uses entry such as ../../secrets/build-env or an absolute path like /proc/self/environ to a project's melange configuration. When CI automatically triggers melange build on the PR without prior review, the unvalidated path escapes the pipeline directory, loads a sensitive or attacker-controlled YAML file, and executes its runs: block via /bin/sh -c in the build sandbox, enabling exfiltration of CI secrets or execution of attacker-supplied commands. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Path traversal in Chainguard's melange build tool (versions >= 0.32.0, < 0.43.4) allows an attacker who can influence a melange configuration file to escape the designated pipeline directory via ../ sequences or absolute paths in pipeline[].uses, enabling both arbitrary file reads and shell command execution within the build sandbox. This is acutely dangerous in pull-request-driven CI or build-as-a-service scenarios where untrusted contributors can submit melange configs that are automatically built without review. No public exploit has been identified at time of analysis; EPSS of 0.01% and SSVC exploitation status 'none' confirm no observed active exploitation, but the impact of arbitrary shell execution during a trusted build pipeline makes this high-priority for affected CI deployments.

RemediationAI

Upgrade melange to v0.43.4 or later, which contains the validated path resolution fix via commit 5829ca4 (https://github.com/chainguard-dev/melange/commit/5829ca45cfe14dfeb73ffb716992db3b1b7892ac); the full advisory is at https://github.com/chainguard-dev/melange/security/advisories/GHSA-98f2-w9h9-7fp9. If immediate upgrade is not possible, the vendor recommends running melange build only against configuration files from fully trusted sources. In CI systems that process user-supplied melange configs, implement a mandatory manual review gate for all pipeline[].uses values before triggering a build, rejecting any value containing .. or a leading /. This gate trades CI throughput for security and must be enforced pre-build, not post-submission, since the vulnerability is triggered at build time.

Affected Packages

go chainguard.dev/melange fix: 0.43.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

melange is a Chainguard-developed APK package build tool written in Go (pkg:go/chainguard.dev/melange) used to build software packages in a sandboxed environment. Pipeline definitions are YAML files that can reference external pipeline fragments via the pipeline[].uses field. The vulnerable function (*Compiled).compilePipeline in pkg/build/compile.go constructed file paths by passing the user-controlled uses value directly to filepath.Join(pipelineDir, uses + ".yaml") without any sanitization or boundary check. CWE-22 (Path Traversal) manifests when user-controlled input is incorporated into a filesystem path without validation, allowing directory escape via ../ components or absolute paths. Critically, the loaded YAML file's runs: block is subsequently passed to /bin/sh -c within the build sandbox, elevating what begins as an arbitrary file read into arbitrary shell code execution. The fix in v0.43.4 (commit 5829ca4) adds two-layer validation: it first rejects uses values that are absolute paths or contain .., then verifies via filepath.Rel after filepath.Clean that the resolved target remains under the pipeline directory.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/chainguard-dev/melange) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
vuln.today AI 6.8 MEDIUM

AV:N reflects the primary remote PR-submission attack vector; AC:H for required CI deployment context; I:H upgraded from vendor I:L to reflect arbitrary shell execution capability.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (https://github.com/chainguard-dev/melange).

CVSS VectorVendor: https://github.com/chainguard-dev/melange

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

2
Patch released
Apr 23, 2026 - 22:15 nvd
Patch available
CVE Published
Apr 23, 2026 - 21:53 nvd
MEDIUM 6.1

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Prevalence
Low
niche Chainguard-ecosystem APK build tool, limited enterprise footprint
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Affected Products (CPE)CVE.org

pkg:go/chainguard.dev_melange

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy