CAPM3 vulnerable to Cross-Namespace resource access
Date: 2026-05
Affected: go/github.com/metal3-io/cluster-api-provider-metal3, go/github.com/metal3-io/cluster-api-provider-metal3
Attack vector: auth-bypass
Category: vulnerability-disclosure
Severity: Medium
CWE: CWE-863
CVSS: 5.5 (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N)

## Summary CAPM3 is Metal3's Cluster API (CAPI) provider for baremetal provisioning in Kubernetes. Multiple cross-namespace access control vulnerabilities in Cluster API Provider Metal3 allow users with permissions to create or modify CAPM3 resources in one namespace to reference, read, or claim resources belonging to other namespaces. ## Patched In - **v1.13.0** (main branch — all fixes included) - **v1.12.5** (all four fixes backported) - **v1.11.8** (three of four fixes backported; Metal3DataClaim template restriction not applicable due to missing v1beta2 webhook infrastructure) ## Description Four related vulnerabilities were identified and fixed: ### 1. Cross-namespace Secret references in Metal3Machine Metal3Machine resources accepted userData, metaData, and networkData secret references pointing to arbitrary namespaces. A user could configure a Metal3Machine to reference secrets in namespaces they do not have access to, and the controller would fetch and use those secrets. ### 2. Cross-namespace BareMetalHost lookups The host annotation on Metal3Machine could include a namespace/name format, causing the controller to look up BareMetalHost resources in arbitrary namespaces. This allowed a user to claim or associate with BareMetalHosts belonging to other tenants. ### 3. Incorrect logical operator in ConsumerRef validation The Metal3LabelSync controller used AND logic (&&) when validating BareMetalHost ConsumerRef Kind and Group, meaning it only rejected a Co


Mitigations:

Architectural layers (MAESTRO):