/

CVE-2026-29075

Severity:

HIGH RISK

(8.3)

Code Injection in Mesa Benchmarks Pipeline

CVE-2026-29075

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Arbitrary Code Execution in CI/CD Environment

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Mesa's GitHub-based benchmarks workflow up to version 3.5.0 checks out and runs untrusted code, enabling arbitrary code execution within a privileged CI runner.

If an attacker can influence the repository content or referenced code at workflow runtime, they may execute arbitrary commands with the runner's privileges during benchmark execution.

Affected context

This vulnerability affects Mesa projects that use the benchmarks.yml GitHub Actions workflow (or equivalent CI configuration) which:

  • Automatically checks out repository code or external code for benchmarking, and
  • Executes benchmark scripts or commands with high privileges on the CI runner.

The risk is elevated in setups where:

  • Pull request or branch code is trusted by default,
  • Benchmarks run automatically on untrusted contributions, or
  • The runner has access tokens, secrets, or internal infrastructure.

Exploit preconditions

  • Attack surface: CI/CD environment, specifically the GitHub Actions (or similar) workflow executing benchmarks.yml.
  • Required access: Ability to submit or modify code/configuration that the workflow checks out (e.g., via pull request, branch push, or compromised dependency repository).
  • Trigger point: Automatic or manual execution of the benchmarks workflow that checks out and runs the contributed code or scripts.
  • Why exploitation is possible: The workflow design implicitly trusts checked-out content and executes it under a privileged runner context without strong isolation or validation, enabling arbitrary commands to run as part of benchmarks.

Why this happens

The core issue aligns with CWE-94: Improper Control of Generation of Code ('Code Injection') in the CI/CD pipeline.

The benchmarks.yml workflow treats repository or referenced code as inherently trustworthy, checking it out and executing it as part of benchmark runs.

Because the workflow does not sufficiently constrain what code can be executed, an attacker who controls or influences the checked-out content can inject commands or scripts that run with the CI runner's privileges.

Conceptually, this is an unsafe pattern where execution logic within automation pipelines is derived from untrusted or partially trusted sources, without sandboxing, policy checks, or strict execution boundaries.

Potential impact

  • Execution of arbitrary commands on the CI runner.
  • Theft or misuse of CI secrets, tokens, or credentials accessible to the runner.
  • Modification or exfiltration of build artifacts, benchmarks, or test results.
  • Use of the runner as a pivot to access internal services reachable from the CI environment.
  • Poisoning of benchmark data or performance metrics to mislead downstream decisions.

General mitigation guidance

Effective mitigation centers on reducing trust in dynamically checked-out code and constraining what CI workflows execute:

  • Separate untrusted contributor benchmarks from trusted workflows, e.g., run on isolated, low-privilege runners with no secrets.
  • Avoid executing arbitrary repository scripts directly; instead, use fixed, version-controlled benchmark commands and entry points defined in the workflow itself.
  • Restrict when workflows run (e.g., only for trusted branches) or gate execution with manual approvals for contributions from forks.
  • Apply least privilege to CI runners: minimize available secrets, network access, and system capabilities for benchmarking jobs.
  • Use sandboxing or containerization for arbitrary code evaluation so that even if code runs, its effects are tightly contained.

How teams detect issues like this

To detect similar issues, organizations can:

  • Review CI/CD workflows for steps that checkout and then execute repository content or scripts derived from contributor-controlled files.
  • Use static analysis or policy-as-code tools (e.g., GitHub Actions linters, OPA-based policies) to flag workflows that execute untrusted code, run shell commands built from inputs, or require excessive permissions.
  • Enforce repository protections so changes to CI workflow files undergo security-focused review.
  • Monitor CI logs and audit trails for anomalous commands, unexpected network calls, or access to secrets during benchmark or test jobs.

Sources

SourceLink
github.comgithub.com/mesa/mesa/commit/c35b8cd67fc89dd680ae218e49b77f6e1ee07a27
github.comgithub.com/mesa/mesa/security/advisories/GHSA-3j55-5q6x-2h48

Frequently asked

questions

Yes. It can typically be exploited remotely by anyone who can influence the code or configuration that the benchmarks workflow checks out, such as through a pull request or commit to a monitored branch, depending on repository settings.

The attacker needs the ability to introduce or alter code that the CI runner will check out and execute during the benchmarks workflow. In many open-source setups, this can mean the ability to open a pull request from a fork or push to a branch with CI enabled.

The safest pattern is to avoid executing arbitrary repository-controlled scripts in privileged CI jobs. Workflows should run only pre-defined, trusted commands, and untrusted contributions should be executed in isolated, low-privilege environments with no access to sensitive secrets or internal networks.

Define and enforce CI/CD security policies that:

  • Treat all contributor-supplied code as untrusted,
  • Prohibit direct execution of unreviewed scripts from pull requests in privileged jobs,
  • Use isolated runners and minimal permissions for any job that executes variable or user-supplied code, and
  • Require security review for changes to workflow configuration files.
Find out what's already
exploitable in your codebase.