Summary
OpsTree BuildPiper allows authenticated deploy users to configure Kubernetes hostPath volumes without adequate authorization or policy checks. If a user can define a volume that mounts the worker node's root filesystem read-write, they may break container isolation and compromise the node or cluster.
Affected context
The issue affects BuildPiper deployments where authenticated deploy users can configure Kubernetes hostPath volumes and the configuration path does not enforce an allow-list or equivalent policy. A volume targeting the worker node's root filesystem with read-write access could expose host resources to a workload.
Exploit preconditions
- Attack surface: BuildPiper deployment configuration for Kubernetes workloads
- Required access: An authenticated account with deploy-user permissions to define or modify hostPath volume settings
- Trigger point: A configured workload is deployed with the hostPath volume
- Why exploitation is possible: Authorization and policy checks do not adequately restrict the host paths or access modes that deploy users can request
Why this happens
The underlying issue is insufficient authorization over a security-sensitive deployment setting. Allowing deploy users to choose arbitrary host paths without enforcing an allow-list or policy can grant workloads access to resources outside their intended container boundary. This is consistent with CWE-269: Improper Privilege Management, because the system does not adequately constrain the privileges available through the user's deployment permissions.
Potential impact
- A workload could gain read-write access to sensitive files on a worker node.
- An attacker may be able to alter node files or interfere with other workloads.
- Node-level compromise could enable lateral movement within the cluster.
- Cluster services, data, or availability could be affected.
General mitigation guidance
Defensive patterns focus on limiting who can configure host mounts and what those configurations permit.
- Prefer secure-by-default workload definitions that do not expose host paths.
- If hostPath volumes are necessary, restrict them to narrowly scoped, explicitly approved paths and access modes.
- Enforce authorization and policy checks on the server side rather than relying on client-side configuration.
- Reduce trust in user-supplied deployment settings through validation against a strict schema and approved policy.
- Apply least privilege to deploy roles and workload service accounts, and use Kubernetes admission controls to reject disallowed host mounts.
How teams detect issues like this
Review deployment configuration and authorization logic for user-controlled hostPath values, missing allow-lists, and insufficient checks on volume access modes. Static analysis and code review can look for paths where deploy-user input reaches Kubernetes volume definitions without policy enforcement. Cluster policy enforcement and audit logs can help identify workloads requesting hostPath mounts, especially broad or read-write mounts.

