Summary
A privilege management flaw in Rancher Local Path Provisioner allows a user who can edit the local-path-config ConfigMap to inject security-sensitive fields into the helperPod.yaml template used for PVC operations.
When the provisioner creates HelperPods from this attacker-controlled template, it may start privileged pods with hostPath mounts, enabling broad access to the underlying Kubernetes node and co-located workloads.
Affected context
This vulnerability affects Kubernetes clusters that:
- Deploy
rancher/local-path-provisioneras a storage provisioner - Use the
local-path-configConfigMap in thelocal-path-storagenamespace to definehelperPod.yaml - Allow some users, controllers, or automation to edit this ConfigMap
The risk materializes when PersistentVolumeClaim (PVC) creation or cleanup triggers HelperPod creation based on the unvalidated template. Clusters with broad ConfigMap edit permissions or shared namespaces are particularly exposed.
Exploit preconditions
- Attack surface: Kubernetes API (configuration layer)
- Required access: Ability to edit or update the
local-path-configConfigMap in thelocal-path-storagenamespace - Trigger point: Any PVC provisioning or cleanup that causes the Local Path Provisioner to instantiate a HelperPod from
helperPod.yaml - Why exploitation is possible:
- The provisioner trusts and directly applies the
helperPod.yamltemplate without enforcing strict validation or policy checks on security-sensitive fields - This enables injection of
securityContext.privileged,hostPathvolumes, and Linux capabilities into pods created automatically by the provisioner
Why this happens
The core issue is improper privilege management and trust in user-editable configuration that controls pod specifications.
The Local Path Provisioner loads helperPod.yaml from a ConfigMap and uses it to create HelperPods without sanitizing or constraining fields that affect pod privilege, such as:
securityContext.privilegedhostPathvolume definitions- Extended Linux capabilities
This aligns with CWE-269: Improper Privilege Management, where a component enables escalation of privileges by delegating security-critical configuration to less-trusted principals. The provisioner effectively acts as a privileged orchestrator that will instantiate high-privilege pods based on attacker-controlled templates.
Potential impact
- Attacker-controlled creation of privileged pods on specific nodes
- Mounting of the host root filesystem into a pod, enabling direct access to host files
- Reading ServiceAccount tokens and secrets from other pods scheduled on the same node
- Accessing other tenants' local-path volume data stored on the node
- Modifying files on the host node, including binaries, configuration, or container runtime data
- Establishing persistent backdoors at the node level or facilitating cluster-wide compromise through lateral movement
General mitigation guidance
Effective mitigation centers on reducing trust in user-controlled templates and tightening privilege boundaries around storage provisioners:
- Constrain who can edit the
local-path-configConfigMap using fine-grained RBAC; treat it as a highly sensitive configuration object - Ensure that only tightly controlled automation or cluster administrators can alter pod templates used by storage provisioners
- Apply admission controls or policies (e.g., PodSecurity standards, policy engines) that reject pods with disallowed fields such as:
securityContext.privileged: true- Arbitrary
hostPathmounts, especially/or other sensitive paths - Elevated capabilities or host-level features
- Prefer secure-by-default templates that omit privileged fields entirely and rely on minimal filesystem and capability requirements
- Run the provisioner with least-privilege RBAC and avoid granting it unnecessary permissions beyond what is required for PVC provisioning
How teams detect issues like this
Organizations can detect and monitor for this pattern using a combination of configuration review, policy enforcement, and runtime monitoring:
- Periodically audit the
local-path-configConfigMap for: - Presence of
securityContext.privileged hostPathvolume usage, especially mounting/or other host system directories- Non-standard or broad Linux capabilities
- Use admission controllers or policy engines to:
- Enforce PodSecurity or custom policies on any pod created by storage provisioners
- Block privileged pods or
hostPathvolumes except in tightly controlled namespaces - Implement configuration-as-code scanning in CI pipelines to flag dangerous changes to provisioner-related ConfigMaps and templates
- Monitor cluster logs and events for:
- New HelperPods created by the Local Path Provisioner with elevated privileges
- Unusual hostPath mount patterns or privileged pod launches in the
local-path-storagenamespace

