{"id":"CVE-2025-29781","aliases":["CVE-2025-29781","GHSA-c98h-7hp9-v9hq","GO-2025-3530"],"related":[],"kind":"vulnerability","state":"published","title":"Bare Metal Operator (BMO) can expose any secret from other namespaces via BMCEventSubscription CRD","summary":"The Bare Metal Operator (BMO) implements a Kubernetes API for managing bare metal hosts in Metal3. Baremetal Operator enables users to load Secret from arbitrary namespaces upon deployment of the namespace scoped Custom Resource `BMCEventSubscription`. Prior to versions 0.8.1 and 0.9.1, an adversary Kubernetes account with only namespace level roles (e.g. a tenant controlling a namespace) may create a `BMCEventSubscription` in his authorized namespace and then load Secrets from his unauthorized namespaces to his authorized namespace via the Baremetal Operator, causing Secret Leakage. The patch makes BMO refuse to read Secrets from other namespace than where the corresponding BMH resource is. The patch does not change the `BMCEventSubscription` API in BMO, but stricter validation will fail the request at admission time. It will also prevent the controller reading such Secrets, in case the BMCES CR has already been deployed. The issue exists for all versions of BMO, and is patched in BMO releases v0.9.1 and v0.8.1. Prior upgrading to patched BMO version, duplicate any existing Secret pointed to by `BMCEventSubscription`'s `httpHeadersRef` to the same namespace where the corresponding BMH exists. After upgrade, remove the old Secrets. As a workaround, the operator can configure BMO RBAC to be namespace scoped, instead of cluster scoped, to prevent BMO from accessing Secrets from other namespaces, and/or use `WATCH_NAMESPACE` configuration option to limit BMO to single namespace.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The Bare Metal Operator (BMO) implements a Kubernetes API for managing bare metal hosts in Metal3. Baremetal Operator enables users to load Secret from arbitrary namespaces upon deployment of the namespace scoped Custom Resource `BMCEventSubscription`. Prior to versions 0.8.1 and 0.9.1, an adversary Kubernetes account with only namespace level roles (e.g. a tenant controlling a namespace) may create a `BMCEventSubscription` in his authorized namespace and then load Secrets from his unauthorized namespaces to his authorized namespace via the Baremetal Operator, causing Secret Leakage. The patch makes BMO refuse to read Secrets from other namespace than where the corresponding BMH resource is. The patch does not change the `BMCEventSubscription` API in BMO, but stricter validation will fail the request at admission time. It will also prevent the controller reading such Secrets, in case the BMCES CR has already been deployed. The issue exists for all versions of BMO, and is patched in BMO releases v0.9.1 and v0.8.1. Prior upgrading to patched BMO version, duplicate any existing Secret pointed to by `BMCEventSubscription`'s `httpHeadersRef` to the same namespace where the corresponding BMH exists. After upgrade, remove the old Secrets. As a workaround, the operator can configure BMO RBAC to be namespace scoped, instead of cluster scoped, to prevent BMO from accessing Secrets from other namespaces, and/or use `WATCH_NAMESPACE` configuration option to limit BMO to single namespace.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe Bare Metal Operator (BMO) implements a Kubernetes API for managing bare metal hosts in Metal3. \n\nBaremetal Operator enables users to load Secret from arbitrary namespaces upon deployment of the namespace scoped Custom Resource `BMCEventSubscription` (BMCES). An adversary Kubernetes account with only namespace level roles (e.g. a tenant controlling a namespace) may create a BMCES in their authorized namespace and then load Secrets from their unauthorized namespaces to their authorized namespace via the Baremetal Operator controller's cluster scoped privileges, causing Secret leakage.\n\n### Patches\n\nThe patch makes BMO refuse to read Secrets from other namespace than where the corresponding Bare Metal Host (BMH) resource is. The patch does not change the `BMCEventSubscription` API in BMO, but stricter validation will deny the request at admission time. It will also prevent the controller reading such Secrets, in case the BMCES resource has already been deployed.\n\nThe issue exists for all versions of BMO, and is patched in BMO releases v0.9.1 and v0.8.1. Prior upgrading to patched BMO version, duplicate any existing Secret pointed to by `BMCEventSubscription`'s `httpHeadersRef` to the same namespace where the corresponding BMH exists. After upgrade, remove the old Secrets.\n\n### Workarounds\n\nOperator can configure BMO RBAC to be namespace scoped, instead of cluster scoped, to prevent BMO from accessing Secrets from other namespaces, and/or use `WATCH_NAMESPACE` configuration option to limit BMO to single namespace.\n\n### References\n\n- [patch to main](https://github.com/metal3-io/baremetal-operator/commit/19f8443b1fe182f76dd81b43122e8dd102f8b94c)\n- [patch to release-0.9](https://github.com/metal3-io/baremetal-operator/pull/2321)\n- [patch to release-0.8](https://github.com/metal3-io/baremetal-operator/pull/2322)\n- [BMCEventSubscription design document](https://github.com/metal3-io/metal3-docs/blob/main/design/baremetal-operator/bmc-events.md)\n\n### Credits\n\nMetal3 Security Team thanks [WHALEEYE](https://github.com/WHALEEYE) and [debuggerchen](https://github.com/debuggerchen) of [Lab for Internet and Security Technology](https://users.cs.northwestern.edu/~list/) for responsible vulnerability disclosure.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Bare Metal Operator (BMO) can expose any secret from other namespaces via BMCEventSubscription CRD in github.com/metal3-io/baremetal-operator/apis","format":"markdown","source":"go"},{"lang":"es","text":"Bare Metal Operator (BMO) implementa una API de Kubernetes para administrar hosts de hardware en Metal3. Este operador permite a los usuarios cargar secretos desde espacios de nombres arbitrarios al implementar el recurso personalizado `BMCEventSubscription` con ámbito de espacio de nombres. Antes de las versiones 0.8.1 y 0.9.1, una cuenta de Kubernetes adversaria con roles solo a nivel de espacio de nombres (por ejemplo, un inquilino que controla un espacio de nombres) podía crear una `BMCEventSubscription` en su espacio de nombres autorizado y luego cargar secretos desde sus espacios de nombres no autorizados a su espacio de nombres autorizado mediante el Baremetal Operator, lo que causaba una fuga de secretos. El parche hace que BMO se niegue a leer secretos de un espacio de nombres diferente al del recurso BMH correspondiente. El parche no modifica la API `BMCEventSubscription` en BMO, pero una validación más estricta fallará la solicitud en el momento de la admisión. También impedirá que el controlador lea dichos secretos, en caso de que el BMCES CR ya se haya implementado. El problema existe en todas las versiones de BMO y está corregido en las versiones 0.9.1 y 0.8.1 de BMO. Antes de actualizar a la versión corregida de BMO, duplique cualquier secreto existente al que apunte `httpHeadersRef` de `BMCEventSubscription` en el mismo espacio de nombres donde exista el BMH correspondiente. Tras la actualización, elimine los secretos antiguos. Como workaround, el operador puede configurar el RBAC de BMO para que tenga alcance de espacio de nombres, en lugar de clúster, para evitar que BMO acceda a secretos de otros espacios de nombres, o bien usar la opción de configuración `WATCH_NAMESPACE` para limitar BMO a un solo espacio de nombres.","source":"nvd"}],"published":"2025-03-17T21:26:14.000Z","modified":"2026-06-17T09:05:39.610Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-200","CWE-653"],"affected":[{"ranges":[{"version":"= 0.9.0","status":"affected"},{"version":"< 0.8.1","status":"affected"}],"vendor":"metal3-io","product":"baremetal-operator","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.9.0","status":"affected","fixed":"0.9.1"}],"ecosystem":"Go","package":"github.com/metal3-io/baremetal-operator/apis","purl":"pkg:golang/github.com/metal3-io/baremetal-operator/apis","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.8.1"}],"ecosystem":"Go","package":"github.com/metal3-io/baremetal-operator/apis","purl":"pkg:golang/github.com/metal3-io/baremetal-operator/apis","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.8.1"},{"type":"semver","introduced":"0.9.0","status":"affected","fixed":"0.9.1"}],"ecosystem":"Go","package":"github.com/metal3-io/baremetal-operator/apis","purl":"pkg:golang/github.com/metal3-io/baremetal-operator/apis","source":"go"}],"references":[{"url":"https://github.com/metal3-io/baremetal-operator/security/advisories/GHSA-c98h-7hp9-v9hq","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/metal3-io/baremetal-operator/pull/2321","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/metal3-io/baremetal-operator/pull/2322","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/metal3-io/baremetal-operator/commit/19f8443b1fe182f76dd81b43122e8dd102f8b94c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/metal3-io/metal3-docs/blob/main/design/baremetal-operator/bmc-events.md","tags":["exploit","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-29781","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/metal3-io/baremetal-operator","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-03-18T14:09:58.967Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-29781","url":"https://www.cve.org/CVERecord?id=CVE-2025-29781","licence":"CVE Terms of Use","modified":"2025-03-18T14:10:03.696Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c98h-7hp9-v9hq","url":"https://github.com/advisories/GHSA-c98h-7hp9-v9hq","licence":"CC-BY-4.0","modified":"2025-03-19T14:59:19.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3530","url":"https://pkg.go.dev/vuln/GO-2025-3530","licence":"CC-BY-4.0","modified":"2026-03-03T04:56:23.688Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-29781","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-29781","licence":"Public domain","modified":"2026-06-17T09:05:39.610Z"}],"updatedAt":"2026-11-25T22:58:55.327Z","epss":{"score":0.00277,"percentile":0.21589,"date":"2026-12-01T12:00:22.000Z"}}