/

CVE-2026-45131

Severity:

CRITICAL RISK

(10.0)

CI/CD Code Execution in CloudPirates Helm Charts

CVE-2026-45131

Deferred

Vulnerability type

Category:

Remote Code Execution in CI/CD Pipeline

CWE:

CWE-94

Impact:

Compromise of CI/CD environment and associated secrets leading to remote code execution and supply-chain attacks

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

An insecure GitHub Actions workflow in the CloudPirates Open Source Helm Charts project executes attacker-controlled code from forked pull requests with access to repository secrets.

An attacker can craft a pull request that, when the workflow runs, exfiltrates secrets such as Docker Hub credentials and tokens without requiring maintainer approval, enabling full compromise of associated registries and supply-chain assets.

Affected context

This vulnerability appears in the project's GitHub Actions configuration, specifically the pull-request.yaml workflow.

It affects repositories where:

  • Pull request workflows are triggered for forks,
  • Untrusted pull request code is executed with the same permissions and secrets as trusted branches, and
  • Secrets (such as Docker Hub credentials and access tokens) are made available to the workflow without isolation.

The issue is specific to CI/CD execution contexts rather than the runtime behavior of deployed Helm charts themselves.

Exploit preconditions

  • Attack surface: GitHub Actions workflow triggered by pull requests from forks.
  • Required access: Ability to submit a pull request to the repository (typically any GitHub user, if the project is open source and accepts PRs from forks).
  • Trigger point: Creation or update of a pull request that causes the vulnerable pull-request.yaml workflow to run.
  • Why exploitation is possible: The workflow executes steps that run code under control of the pull request author while concurrently exposing repository secrets to that job, without requiring explicit maintainer review or using restricted tokens.

Why this happens

The core issue is the execution of untrusted code with high-privilege credentials in an automated workflow, mapping to CWE-94: Improper Control of Generation of Code ('Code Injection') in a CI/CD context.

The pull-request.yaml GitHub Actions workflow treats code and configuration from forked pull requests as trusted, allowing them to run commands in the workflow environment where repository-level secrets (e.g., Docker Hub credentials and tokens) are available.

This creates an implicit code injection channel: an attacker-controlled pull request can embed arbitrary shell commands or scripts in the workflow execution path, which then run with the repository's secret context and network access, enabling secret exfiltration and downstream resource compromise.

Potential impact

  • Exfiltration of repository secrets, including Docker Hub credentials and various access tokens.
  • Unauthorized pushes of malicious container images to Docker Hub or other registries, facilitating supply-chain attacks on downstream consumers.
  • Tampering with build artifacts or Helm chart images to inject backdoors, cryptominers, or data exfiltration logic.
  • Impersonation of the project in registries, damaging project reputation and trust.
  • Potential pivoting into other systems or services that trust the compromised tokens or credentials (e.g., other CI/CD pipelines or cloud environments).

General mitigation guidance

Effective mitigation focuses on separating trust boundaries in CI/CD and eliminating execution of untrusted code with privileged credentials.

Recommended patterns include:

  • Avoid exposing sensitive secrets to workflows triggered by pull requests from forks; use GitHub's default behavior of withholding secrets for fork-based PRs and do not override it.
  • Design PR workflows to run in an unprivileged context using ephemeral or restricted tokens with minimal scopes.
  • Restrict workflow permissions via fine-grained permissions: settings in GitHub Actions, granting only what is strictly necessary.
  • Use separate, manually triggered workflows (e.g., workflow_dispatch) for operations that require elevated privileges or push to registries, only runnable by trusted maintainers.
  • Introduce explicit review or approval steps before any untrusted code path can interact with sensitive resources such as registries or signing keys.
  • Prefer build architectures where the CI pulls code from trusted branches only, and treats PR builds as untrusted previews without publication authority.

How teams detect issues like this

High-level detection approaches for similar CI/CD vulnerabilities include:

  • Static review of GitHub Actions workflows to identify:
  • Workflows triggered by pull_request or pull_request_target that expose secrets.*.
  • Steps that run arbitrary shell commands (run:) or scripts sourced from pull request changes with access to privileged tokens.
  • Overly broad permissions: configurations (e.g., contents: write, packages: write) for PR workflows.
  • Policy-based checks (e.g., using GitHub Advanced Security, Open Policy Agent, or custom linters) to enforce that fork-based PR workflows:
  • Do not have access to high-value secrets.
  • Run with restricted tokens and read-only permissions.
  • Periodic audits of CI logs and artifact publication history for signs of anomalous activity, such as unexpected image pushes or registry changes.
  • Incorporating automated CI configuration scanning tools that understand common CI platforms and flag misconfigurations where untrusted code can run with privileged credentials.

Sources

SourceLink
github.comgithub.com/CloudPirates-io/helm-charts/commit/fcf930211604652aec15085895b6457bc8b73b54
github.comgithub.com/CloudPirates-io/helm-charts/security/advisories/GHSA-c47r-c7gw-cvph

Frequently asked

questions

Yes. An attacker with the ability to open a pull request from a fork can exploit this purely through GitHub, without direct access to the repository infrastructure. The workflow runs in GitHub Actions and executes attacker-controlled code with access to secrets.

The attacker typically only needs the permission to create a pull request against the affected repository. For open-source projects that allow fork-based contributions, this is usually available to any GitHub user.

The safest approach is to ensure that workflows triggered by untrusted events (such as pull requests from forks) never receive sensitive secrets or high-privilege tokens, and that privileged operations (publishing images, pushing tags, signing artifacts) are performed only in workflows that are triggered from trusted branches and guarded by maintainer-controlled triggers.

Prevention involves designing CI workflows with clear trust boundaries: isolate untrusted contributions, run them with minimal permissions, rely on default protections against secret exposure, and enforce configuration reviews and automated checks that flag workflows where untrusted code would run with elevated privileges or access to secrets.

Find out what's already
exploitable in your codebase.