PT-2026-6475 · Go · Chainguard.Dev/Melange

Published

2026-02-04

·

Updated

2026-02-04

CVSS v3.1

7.8

High

VectorAV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
An attacker who can influence inputs to the patch pipeline could execute arbitrary shell commands on the build host. The patch pipeline in pkg/build/pipelines/patch.yaml embeds input-derived values (series paths, patch filenames, and numeric parameters) into shell scripts without proper quoting or validation, allowing shell metacharacters to break out of their intended context.
The vulnerability affects the built-in patch pipeline which can be invoked through melange build and melange license-check operations. An attacker who can control patch-related inputs (e.g., through pull request-driven CI, build-as-a-service, or by influencing melange configurations) can inject shell metacharacters such as backticks, command substitutions $(…), semicolons, pipes, or redirections to execute arbitrary commands with the privileges of the melange build process.
Fix: Fixed in bd132535 , Released in 0.40.3.
Acknowledgements
melange thanks Oleh Konko (@1seal) from 1seal for discovering and reporting this issue.

Fix

OS Command Injection

Weakness Enumeration

Related Identifiers

GHSA-RF4G-89H5-CRCR

Affected Products

Chainguard.Dev/Melange