CVE-2024-43803
📋 TL;DR
The Bare Metal Operator (BMO) in Metal3 allows users with BareMetalHost creation/edit permissions to exfiltrate Kubernetes Secrets from any namespace by referencing them in BMH configuration. This affects multi-tenant clusters where non-admin users have BMH access but are supposed to be namespace-scoped.
💻 Affected Systems
- Metal3 Bare Metal Operator
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Privileged users could exfiltrate sensitive secrets from any namespace, potentially compromising cluster credentials, API keys, or other confidential data stored in Kubernetes Secrets.
Likely Case
In multi-tenant environments, users could access secrets from other tenants' namespaces, violating namespace isolation and potentially accessing sensitive configuration data.
If Mitigated
With proper RBAC limiting BMH access to cluster admins only, the vulnerability has minimal impact as admins already have access to all secrets.
🎯 Exploit Status
Exploitation requires authenticated Kubernetes API access with appropriate RBAC permissions for BareMetalHost resources.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.5.2, v0.6.2, v0.7.0 or later
Vendor Advisory: https://github.com/metal3-io/baremetal-operator/security/advisories
Restart Required: Yes
Instructions:
1. Upgrade BMO to v0.5.2, v0.6.2, or v0.7.0 depending on your current version. 2. Before upgrading, duplicate any BMC Secrets to the same namespace as their corresponding BMH. 3. After upgrade, remove old Secrets from other namespaces. 4. Restart BMO pods.
🔧 Temporary Workarounds
Namespace-scoped RBAC for Secrets
allConfigure BMO RBAC to be namespace-scoped for Secrets instead of cluster-scoped to prevent cross-namespace secret access.
kubectl edit clusterrole baremetal-operator
Modify Secret permissions to be namespace-scoped
🧯 If You Can't Patch
- Restrict BareMetalHost creation/edit permissions to cluster administrators only
- Implement network policies to limit BMO pod access to only necessary namespaces
🔍 How to Verify
Check if Vulnerable:
Check BMO version: kubectl get deployment -n metal3 baremetal-operator -o jsonpath='{.spec.template.spec.containers[0].image}'. If version is below 0.5.2, 0.6.2, or 0.7.0 (depending on your release track), you are vulnerable.
Check Version:
kubectl get deployment -n metal3 baremetal-operator -o jsonpath='{.spec.template.spec.containers[0].image}' | grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+'
Verify Fix Applied:
After upgrade, attempt to create a BMH referencing a Secret from another namespace - this should fail with validation error.
📡 Detection & Monitoring
Log Indicators:
- BMO logs showing attempts to read Secrets from different namespaces
- Failed BMH validations due to cross-namespace secret references
Network Indicators:
- Unusual API calls from BMO service account to Secrets API in different namespaces
SIEM Query:
kubernetes.pod_name:"baremetal-operator" AND (kubernetes.event.objectRef.resource:"secrets" AND kubernetes.event.objectRef.namespace != "metal3")
🔗 References
- https://github.com/metal3-io/baremetal-operator/commit/3af4882e9c5fadc1a7550f53daea21dccd271f74
- https://github.com/metal3-io/baremetal-operator/commit/bedae7b997d16f36e772806681569bb8eb4dadbb
- https://github.com/metal3-io/baremetal-operator/commit/c2b5a557641bc273367635124047d6c958aa15f7
- https://github.com/metal3-io/baremetal-operator/pull/1929
- https://github.com/metal3-io/baremetal-operator/pull/1930
- https://github.com/metal3-io/baremetal-operator/pull/1931
- https://github.com/metal3-io/baremetal-operator/security/advisories/GHSA-pqfh-xh7w-7h3p