CVE-2026-25143: Chainguard.dev/melange Melange Affected By Potential Host Vulnerability

HIGH
Advisory Identifier: GHSA-rf4g-89h5-crcr
CVSS 7.8
CWE-78
Published
Advisory Summary

CVE-2026-25143 is a HIGH (CVSS 7.8) melange affected by potential host vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Chainguard.dev/melange libraries in the Go ecosystem. The issue involves melange affected by potential host command execution via license-check yaml mode patch pipeline. Remediation is available by upgrading affected packages to version 0.40.3.

CVE-2026-25143 at a Glance

CVE Identifier CVE-2026-25143
GHSA Identifier GHSA-rf4g-89h5-crcr
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Chainguard.dev/melange
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-25143

To remediate this vulnerability, upgrade all affected Chainguard.dev/melange dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

chainguard.dev/melange fixed: 0.40.3
Upgrade chainguard.dev/melange to 0.40.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for chainguard.dev/melange

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-25143, inspect your project dependencies for Chainguard.dev/melange:

inspect dependencies for chainguard.dev/melange

Analyze the terminal output to locate any version of Chainguard.dev/melange in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.40.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Chainguard.dev/melange, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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](https://github.com/chainguard-dev/melange/commit/bd132535cd9f57d4bd39d9ead0633598941af030) , Released in 0.40.3. Acknowledgements melange thanks Oleh Konko (@1seal) from 1seal for discovering and reporting this issue.

CVE-2026-25143 Affected Chainguard.dev/melange Versions

1 component(s)
Fixed Versions:
0.40.3
Product / Package Ecosystem Affected Versions Fixed Version
chainguard.dev/melange
Go
≥ 0.10.0
< 0.40.3
0.40.3

References

Frequently Asked Questions

What is CVE-2026-25143?
CVE-2026-25143 is a security vulnerability in Chainguard.dev/melange involving melange affected by potential host command execution via license-check YAML mode patch pipeline under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Chainguard.dev/melange versions are affected?
Affected versions include releases prior to 0.40.3 across affected packages: chainguard.dev/melange.
What version fixes CVE-2026-25143?
Upgrading to 0.40.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is chainguard.dev/melange affected?
Yes, chainguard.dev/melange is affected in releases prior to 0.40.3. Upgrade your dependency to 0.40.3 or later.
What is the CVSS score of CVE-2026-25143?
CVE-2026-25143 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-25143?
CVE-2026-25143 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Go dependencies for CVE-2026-25143?
Run the dependency tree command: 'inspect dependencies for chainguard.dev/melange'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rf4g-89h5-crcr",
  "modified" : "2026-02-04T21:56:08Z",
  "published" : "2026-02-04T00:09:15Z",
  "aliases" : [ "CVE-2026-25143" ],
  "summary" : "melange affected by potential host command execution via license-check YAML mode patch pipeline ",
  "details" : "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.                                                                                                                                                               \n                                                                                                                                                                                        \nThe 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.                                                              \n\nFix: Fixed in [bd132535](https://github.com/chainguard-dev/melange/commit/bd132535cd9f57d4bd39d9ead0633598941af030) ,  Released in 0.40.3.\n                                                                                                                                                                                 \nAcknowledgements                                                                                                                                                                      \n                                                                                                                                                                                        \nmelange thanks Oleh Konko (@1seal) from 1seal for discovering and reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "chainguard.dev/melange"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.10.0"
      }, {
        "fixed" : "0.40.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/melange/security/advisories/GHSA-rf4g-89h5-crcr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25143"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/melange/commit/bd132535cd9f57d4bd39d9ead0633598941af030"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/chainguard-dev/melange"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-04T00:09:15Z",
    "nvd_published_at" : "2026-02-04T20:16:06Z"
  }
}