/

CVE-2026-44359

Severity:

CRITICAL RISK

(10.0)

CI Workflow RCE (CWE-94) via Fork Code in Meshtastic

CVE-2026-44359

Deferred

Vulnerability type

Category:

Remote Code Execution in CI/CD Workflows

CWE:

CWE-94, CWE-829

Impact:

Repository and Supply Chain Compromise via CI RCE

Severity:

CRITICAL RISK

(10.0)

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

A critical CI workflow vulnerability in the Meshtastic repository allowed attacker-controlled code from untrusted forks to run with repository secrets and elevated GITHUB_TOKEN permissions.

When a pull_request_target event was opened by an external contributor, the workflow automatically checked out and executed forked code without approval, enabling potential repository takeover and supply chain compromise.

Affected context

This vulnerability occurs in GitHub Actions workflows that:

  • Are triggered by pull_request_target on untrusted contributions
  • Check out and execute code from the attacker's fork
  • Grant elevated GITHUB_TOKEN scopes and repository secrets to the workflow
  • Lack an approval or trust gate before running attacker-controlled jobs

In this case, the main_matrix.yml workflow for Meshtastic's CI pipeline was affected across multiple jobs (check, build, and build-debian-src).

Exploit preconditions

  • Attack surface: GitHub Actions CI pipeline for the Meshtastic repository
  • Required access: Ability to open a pull request from a fork (author_association: "NONE")
  • Trigger point: Automatic execution of the main_matrix.yml GitHub Actions workflow on pull_request_target
  • Why exploitation is possible: The workflow:
  • Uses pull_request_target, which runs in the context of the base repository
  • Checks out and directly executes attacker-controlled fork code
  • Provides access to repository secrets and a highly privileged GITHUB_TOKEN
  • Has no manual approval or trust filter before executing CI jobs

Why this happens

The underlying issue is the insecure handling of untrusted code within a privileged CI/CD environment, mapping to CWE-94: Improper Control of Generation of Code and CWE-829: Inclusion of Functionality from Untrusted Control Sphere.

The workflow design allowed forked code to be treated as trusted and executed directly under the repository's security context.

This pattern effectively generates and runs attacker-specified logic during CI, while giving it broad access to secrets and repository write capabilities, violating the principle of least privilege and safe boundary isolation for contributed code.

Potential impact

  • Attacker-controlled remote code execution within CI runners
  • Exposure or exfiltration of repository secrets (tokens, keys, credentials)
  • Repository takeover via privileged GITHUB_TOKEN (e.g., pushing malicious commits, altering branches, modifying workflows)
  • Supply chain compromise by injecting malicious artifacts or releases
  • Compromise of self-hosted GitHub Actions runners and adjacent infrastructure

General mitigation guidance

Secure CI/CD patterns for this class of vulnerability typically focus on:

  • Avoiding pull_request_target for workflows that build or execute fork code, or strictly limiting its capabilities
  • Ensuring untrusted code runs with minimal permissions, no secrets, and a restricted GITHUB_TOKEN scope (e.g., read-only, no contents: write)
  • Introducing explicit approval gates or "trusted contributor" checks before running privileged workflows
  • Separating workflows that validate contributions from those that perform release or deployment operations
  • Treating fork code as untrusted input: run in sandboxed jobs, with isolated environments and without direct access to repository resources

These patterns make it harder for contributed code to gain control over the CI environment or repository state.

How teams detect issues like this

Organizations can detect similar workflow risks by:

  • Reviewing GitHub Actions definitions for pull_request_target triggers that:
  • Check out code from forks
  • Run arbitrary scripts from contributor-controlled paths
  • Access secrets or grant elevated GITHUB_TOKEN scopes
  • Using policy-as-code tools or CI security scanners to flag:
  • Workflows that mix untrusted code with privileged tokens
  • Jobs that run on self-hosted runners with broad permissions
  • Implementing static analysis or configuration linting for CI manifests to enforce:
  • Least-privilege token scopes
  • No-secrets policies on untrusted contribution workflows
  • Mandatory manual approval steps for workflows that can modify repository state
  • Periodic audits of workflow execution logs to identify suspicious behavior, such as unexpected network calls or repository modifications initiated from PR-triggered jobs.

Sources

SourceLink
drive.google.comdrive.google.com/file/d/1GdHT2s5hMYCiHt4zrWt1q58mvL7WQC0M/view?usp=sharing
github.comgithub.com/meshtastic/firmware/commit/5716aeba3bc1e1d34fba9567ff88917ede4a78a5
github.comgithub.com/meshtastic/firmware/security/advisories/GHSA-6mwm-v2vv-pp96
github.comgithub.com/meshtastic/firmware/security/advisories/GHSA-mjx5-98jq-q736

Frequently asked

questions

It is exploitable by anyone who can open a pull request from a fork against the affected repository. No special repository permissions are required beyond the ability to submit a PR.

No. The workflow itself exposes secrets and a privileged GITHUB_TOKEN to the jobs that run forked code, so an attacker only needs the ability to trigger those jobs via a PR.

Separate untrusted contribution workflows from privileged operations, avoid running fork code under pull_request_target with secrets, and ensure that any workflow with elevated permissions only runs trusted, repository-owned code behind an approval or trust gate.

Adopt CI security design guidelines: treat contributed code as untrusted by default, enforce least privilege on tokens and secrets, use automated checks to flag risky workflow constructs, and require human review or policy checks before privileged jobs execute code originating from forks or external contributors.

Find out what's already
exploitable in your codebase.