CVE-2026-25143
JSON

7.8high

melange affected by potential host command execution via license-check YAML mode patch pipeline

Severity
7.8high CVSS:3.1 by GitHub_M
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rf4g-89h5-crcrGO-2026-4412

Description

melange allows users to build apk packages using declarative pipelines. From version 0.10.0 to before 0.40.3, 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. This issue has been patched in version 0.40.3.

Affected

Product or packageVersionsReported by
chainguard-dev melange>= 0.10.0, < 0.40.3CVE List
chainguard.dev/melange (Go)from 0.10.0 before 0.40.3GitHub Advisory Database, Go Vulnerability Database
chainguard melangefrom 0.10.0 before 0.40.5NVD

All scores

GitHub_M7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-78

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

melange allows users to build apk packages using declarative pipelines. From version 0.10.0 to before 0.40.3, 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. This issue has been patched in version 0.40.3.

GitHub Advisory Database

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.

Go Vulnerability Database

melange affected by potential host command execution via license-check YAML mode patch pipeline in chainguard.dev/melange

NVD (es)

melange permite a los usuarios construir paquetes apk usando pipelines declarativos. Desde la versión 0.10.0 hasta antes de la 0.40.3, un atacante que pueda influir en las entradas del pipeline de parche podría ejecutar comandos de shell arbitrarios en el host de compilación. El pipeline de parche en pkg/build/pipelines/patch.yaml incrusta valores derivados de la entrada (rutas de series, nombres de archivo de parche y parámetros numéricos) en scripts de shell sin la debida entrecomillado o validación, permitiendo que los metacaracteres de shell salgan de su contexto previsto. La vulnerabilidad afecta al pipeline de parche incorporado que puede ser invocado a través de las operaciones melange build y melange license-check. Un atacante que pueda controlar las entradas relacionadas con el parche (por ejemplo, a través de CI impulsado por solicitudes de extracción, build-as-a-service, o influyendo en las configuraciones de melange) puede inyectar metacaracteres de shell como backticks, sustituciones de comandos $(…), puntos y coma, pipes o redirecciones para ejecutar comandos arbitrarios con los privilegios del proceso de compilación de melange. Este problema ha sido parcheado en la versión 0.40.3.

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2026-25143 changed 2026-02-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-rf4g-89h5-crcr changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4412 changed 2026-02-05CC-BY-4.0
NVDCVE-2026-25143 changed 2026-06-17Public domain