Summary
OpsTree BuildPiper allows project users to submit unrestricted Kubernetes manifests through its Additional Manifest feature. If the pipeline applies those manifests using cluster-wide credentials, a user may escalate privileges to cluster-admin and gain control over cluster resources.
Affected context
The issue affects BuildPiper deployments where project users can provide Additional Manifest content and the pipeline applies that content with credentials that have cluster-wide permissions. The risk is present when submitted manifests are not adequately restricted or authorized before application.
Exploit preconditions
- Attack surface: The Additional Manifest feature in a BuildPiper pipeline
- Required access: A project user account with permission to submit or modify manifests
- Trigger point: The pipeline applies the submitted Kubernetes manifest
- Why exploitation is possible: The pipeline uses cluster-wide credentials and does not sufficiently constrain the manifest's permissions or effects
Why this happens
The vulnerability is an access-control and privilege-management failure. User-controlled manifests are applied with authority broader than the submitting user's intended permissions, allowing a lower-privileged user to cause privileged cluster changes. This maps to CWE-269: Improper Privilege Management.
Potential impact
- A user could bind a service account to the cluster-admin role
- An attacker may gain control over workloads and other cluster resources
- Cluster secrets could be exposed or modified
- Cluster integrity, availability, and confidentiality may be compromised
General mitigation guidance
Defensive patterns focus on limiting the authority of pipeline operations and controlling which manifests users can submit.
- Apply manifests using narrowly scoped, least-privilege identities rather than cluster-wide credentials where possible
- Restrict or disable user-supplied manifests unless they are required
- Validate and authorize manifest contents against explicit policies before application
- Separate project-level permissions from cluster-administration capabilities
- Require review or approval for changes that grant elevated Kubernetes privileges
How teams detect issues like this
- Review code and configuration paths that accept Additional Manifest content and apply it to Kubernetes
- Use static analysis and code review to identify user-controlled input passed to privileged deployment operations
- Audit role bindings and cluster role bindings for unexpected grants, especially bindings to cluster-admin
- Enforce admission policies that reject unauthorized privilege escalation or overly broad permissions
- Monitor pipeline identities and Kubernetes audit logs for cluster-wide changes initiated by project workflows

