---
id: "CVE-2026-50240"
page: "https://infrastack.ai/live/CVE-2026-50240"
kind: "vulnerability"
aliases: ["CVE-2026-50240"]
title: "OpenShift Pipelines-as-Code: namespace users can escalate privileges via PipelineRuns"
severity: "high"
cvss: 8.8
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["ci-cd", "infrastructure", "kubernetes", "openshift", "pipelines-as-code", "tekton"]
not_affected_if: ["no-namespace-repository-rights", "no-pipelines-as-code"]
published_at: "2026-11-06T22:17:58+00:00"
first_seen_at: "2026-11-06T22:44:32+00:00"
updated_at: "2026-11-06T22:46:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-50240", "first_seen_at": "2026-11-06T22:44:32+00:00"}, {"source": "analyst", "url": "https://access.redhat.com/security/cve/CVE-2026-50240", "first_seen_at": "2026-11-06T22:46:06+00:00", "cites": ["https://access.redhat.com/security/cve/CVE-2026-50240", "https://access.redhat.com/security/cve/CVE-2026-50240"]}]
exploit_sources: []
---

# OpenShift Pipelines-as-Code: namespace users can escalate privileges via PipelineRuns

Link for people: https://infrastack.ai/live/CVE-2026-50240 (this .md is for agents)

OpenShift Pipelines-as-Code does not check whether the creator of a Repository resource may create PipelineRuns. A namespace user with only Repository and Secret create or delete rights can make it run attacker-chosen PipelineRuns as the pipeline ServiceAccount, which has edit rights by default.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Check whether OpenShift Pipelines (operator openshift-pipelines-operator-rh) is installed: 'oc get tektonconfig config -o yaml' and look at legacyPipelineRbac (anything but false means the operator provisions the edit RoleBinding). 'oc get rolebinding openshift-pipelines-edit -n <ns>' shows the edit binding for the pipeline ServiceAccount. Also review who can create Repository (pipelinesascode.tekton.dev) and Secrets in each namespace: 'oc auth can-i create repositories.pipelinesascode.tekton.dev -n <ns> --as <user>'.

## Fix

No fixed version published on the Red Hat CVE page as of 2026-11-06. Workaround: set legacyPipelineRbac to false in the TektonConfig custom resource.

## Timeline

- 2026-11-06T22:44:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-50240
- 2026-11-06T22:46:06+00:00 analyst https://access.redhat.com/security/cve/CVE-2026-50240 — Red Hat CVE page read: no fix or version range listed; mitigation is legacyPipelineRbac=false in TektonConfig (deleting the openshift-pipelines-edit RoleBinding is not enough, operator recreates it; may break pipelines relying on edit). PAC v0.48.0 release does not mention this CVE. Reporter: Christopher Lusk. No exploitation or PoC found. Affected versions unknown; Red Hat errata would settle it.

## Documents

- [advisory] Red Hat CVE-2026-50240 https://access.redhat.com/security/cve/CVE-2026-50240
- [mitigation] Red Hat CVE-2026-50240 https://access.redhat.com/security/cve/CVE-2026-50240

## From the sources

A flaw was found in OpenShift Pipelines-as-Code (PAC). PAC does not verify whether the creator of a Repository custom resource has permission to create PipelineRuns. A namespace user with only Repository and Secret create/delete permissions can cause PAC to execute attacker-controlled PipelineRuns as the auto-provisioned pipeline ServiceAccount, which carries ClusterRole/edit by default. This results in namespace-scoped privilege escalation, enabling Secret read, resource creation/modification/deletion, and potential supply chain injection in CI/CD namespaces.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
