GHSA-rjr3-43j3-4q8g: Kubeflow Pipelines API server lacks authorization for shared pipeline uploads
- Source:
- OSV.dev
- Published:
- Fetched:
- Updated:
- Affects:
- github.com/kubeflow/pipelines
https://osv.dev/vulnerability/GHSA-rjr3-43j3-4q8g ↗
Kubeflow Pipelines API server lacks authorization for shared pipeline uploads ## Summary In multi-user mode, the Kubeflow Pipelines API server's HTTP multipart upload endpoints (`POST /apis/v2beta1/pipelines/upload` and `POST /apis/v2beta1/pipelines/upload_version`) perform no authorization when the target namespace is empty. The authorization helper `canUploadVersionedPipeline` returns `nil`, skipping `SubjectAccessReview`, whenever the resolved namespace is the empty string (`backend/src/apiserver/server/pipeline_upload_server.go:401-403`). An empty namespace is how KFP addresses shared, cluster-wide pipelines and is the default whenever the caller omits the `namespace` query parameter, because `REQUIRE_NAMESPACE_FOR_PIPELINES` defaults to `false` and is unset in every shipped manifest. As a result, an arbitrary low-privilege tenant (or, when the API server is reachable, an unauthenticated caller) can create cluster-shared pipelines and inject new versions into existing shared pipelines, replacing the container image, command, and args that other tenants execute. The gRPC sibling for the same write, `canAccessPipeline`, instead remaps the empty namespace to the system namespace and authorizes, with a comment stating shared-pipeline writes "must still be authorized". That confirms this is an omission, not intended behavior. ## Description `uploadPipeline` and `uploadPipelineVersion` both build a `ResourceAttributes{Verb: create}` and delegate the access decision to `canUploadVersionedPipeline`: ```go // backend/src/apiserver/server/pipeline_upload_server.go:387-421 func (s *PipelineUploadServer) canUploadVersionedPipeline(r *http.Request, pipelineID string, resourceAttributes *authorizationv1.ResourceAttributes) error { if !common.IsMultiUserMode() { return nil } if len(pipelineID) > 0 { namespace, err := s.resourceManager.FetchNamespaceFromPipelineId(pipelineID) if err != nil { return util.Wrap(err, "Failed to authorize with the Pipeline ID") } if len(resourceAttributes.Namespace) == 0 { resourceAttributes.Namespace = namespace } } if resourceAttributes.Namespace == "" { return nil // empty namespace = no SubjectAccessReview } // ... only here does IsAuthorized() run ... } ``` When the namespace is empty (a shared/cluster-wide pipeline, or simply an upload with no `namespace` parameter), the function returns at line 401-403 and `IsAuthorized` is never reached. Reachability is the default. `ValidateNamespaceRequired` only rejects an empty namespace when `IsNamespaceRequiredForPipelines()` is true: ```go // backend/src/apiserver/validation/namespace.go:25-30 func ValidateNamespaceRequired(namespace string) error { if common.IsMultiUserMode() && common.IsNamespaceRequiredForPipelines() && namespace == "" { return util.NewInvalidInputError("Namespace is required for pipeline operations") } return nil } // backend/src/apiserver/common/config.go:73-74 -> default FALSE func IsNamespaceRequiredForPipelines() bool { return GetBoolConfigWithDefault(RequireNamespaceForPipelines, fal Affected: Go:github.com/kubeflow/pipelines Fixed in: 0.0.0-20260909234119-62516d8c525f References: https://github.com/kubeflow/pipelines/security/advisories/GHSA-rjr3-43j3-4q8g https://nvd.nist.gov/vuln/detail/CVE-2026-77596 https://github.com/kubeflow/pipelines/pull/14352 https://github.com/kubeflow/pipelines/commit/62516d8c525f146b754cb515cf441dd0290ad841 https://github.com/kubeflow/pipelines https://github.com/kubeflow/pipelines/releases/tag/2.18.0