/

CVE-2026-50240

Severity:

HIGH RISK

(8.8)

Missing Authorization Check (CWE-862) in OpenShift PAC

CVE-2026-50240

Awaiting Analysis

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Namespace-Scoped Privilege Escalation

Severity:

HIGH RISK

(8.8)

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

OpenShift Pipelines-as-Code (PAC) does not check whether the creator of a Repository custom resource is authorized to create PipelineRuns. A namespace user with permission to create and delete Repository and Secret resources may be able to trigger attacker-controlled PipelineRuns that run with the auto-provisioned pipeline ServiceAccount's permissions.

Affected context

The issue occurs in PAC when it processes a Repository custom resource without verifying that its creator may create PipelineRuns. It becomes risky when a namespace user can create and delete Repository and Secret resources, and the auto-provisioned pipeline ServiceAccount has broad permissions, such as the default ClusterRole/edit binding described.

Exploit preconditions

  • Attack surface: PAC processing Repository custom resources in a CI/CD namespace
  • Required access: Permission to create and delete Repository and Secret resources in the namespace
  • Trigger point: PAC handles a Repository resource and runs an associated PipelineRun
  • Why exploitation is possible: PAC does not verify that the Repository creator is authorized to create PipelineRuns, which may execute with the pipeline ServiceAccount's permissions

Why this happens

PAC fails to enforce an authorization check connecting the Repository resource's creator to permission to create PipelineRuns. This is a missing authorization control, mapping to CWE-862: Missing Authorization. As a result, a user with limited resource permissions may cause actions to run under a more privileged ServiceAccount.

Potential impact

  • An attacker could read Secrets available to the pipeline ServiceAccount.
  • PipelineRuns may create, modify, or delete namespace resources.
  • CI/CD resources or workflows may be altered, potentially enabling supply-chain injection.
  • The effects may extend to resources within the namespace, depending on the ServiceAccount's permissions.

General mitigation guidance

Defensive patterns focus on enforcing authorization at the point where PAC accepts and processes Repository resources.

  • Verify that the resource creator is authorized to initiate PipelineRuns.
  • Apply least privilege to pipeline ServiceAccounts rather than relying on broad default roles.
  • Restrict which users and automation identities can create or modify Repository and Secret resources.
  • Constrain PipelineRun inputs and execution to approved definitions and trusted sources.
  • Separate CI/CD identities and permissions by namespace and task where practical.

How teams detect issues like this

  • Review authorization paths for Repository creation and PipelineRun execution, including whether the original user's permissions are checked.
  • Use static analysis and code review to identify resource-triggered actions that run under more privileged identities without an explicit authorization check.
  • Audit role bindings and ServiceAccount permissions for pipeline identities, especially broad edit permissions.
  • Monitor Repository and PipelineRun creation alongside Secret access and namespace resource changes.
  • Enforce policy checks that limit who may create Repository resources and which identities PipelineRuns may use.

Sources

SourceLink
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-50240
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2484752
github.comgithub.com/openshift-pipelines/pipelines-as-code/commit/ac1ff2337fce1ffdf888f513c6202caa95853927
github.comgithub.com/tektoncd/pipelines-as-code/security/advisories/GHSA-8m5v-wh4r-5j96

Frequently asked

questions

A namespace user with permission to create and delete Repository and Secret resources may be able to trigger the vulnerable PAC behavior.

No. The described prerequisite is namespace-level access; the impact depends on the permissions granted to the pipeline ServiceAccount.

Check that the Repository creator is authorized to create PipelineRuns, and ensure pipeline ServiceAccounts have only the permissions their tasks require.

Enforce authorization checks at resource-triggered execution boundaries, restrict resource-creation privileges, and regularly review CI/CD identity permissions.

Find out what's already
exploitable in your codebase.