GHSA-RF84-WR5G-M3RP

Vulnerability from github – Published: 2026-05-29 19:01 – Updated: 2026-05-29 19:01
VLAI
Summary
CAPM3 vulnerable to Cross-Namespace resource access
Details

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 ConsumerRef when both Kind and Group were wrong. If only one was incorrect (e.g., wrong Kind but correct Group), the validation passed, potentially allowing unauthorized resources to associate with a BareMetalHost.

4. Cross-namespace Metal3DataTemplate references

Metal3DataClaim resources could reference Metal3DataTemplate resources in other namespaces. The controller would reconcile using the referenced template regardless of namespace, allowing data leakage across namespace boundaries.

Impact

These vulnerabilities allow cross-namespace resource access within the CAPM3 management cluster. A user with permissions to create or modify Metal3Machine or Metal3DataClaim resources in one namespace could reference secrets, BareMetalHosts, or data templates in other namespaces.

Practical impact is limited because:

  • CAPM3 management clusters are typically single-tenant, operated by a single infrastructure/platform team. Namespace boundaries serve as organizational separation (e.g., per workload cluster), not as security isolation between mutually untrusted parties.
  • Exploiting these issues requires RBAC permissions to create or modify CAPM3 infrastructure resources (Metal3Machine, Metal3DataClaim), which are infrastructure-admin privileges not granted to application developers or end users.
  • The accessible resources are limited to Metal3 operational artifacts (bootstrap secrets, network metadata, BareMetalHost associations), not arbitrary cluster secrets.

Environments with elevated risk:

  • Management clusters where namespace-scoped RBAC is used to delegate infrastructure provisioning to separate teams with different trust levels.
  • Managed service providers using a shared management cluster across multiple customer namespaces.

In the common single-team deployment model, these issues represent a defense-in-depth gap rather than a directly exploitable privilege escalation.

Prerequisites for exploitation

  • Attacker must have RBAC permissions to create or modify Metal3Machine or Metal3DataClaim resources in at least one namespace.
  • Target resources (secrets, BareMetalHosts, templates) must exist in other namespaces on the same management cluster.

Workarounds

If upgrading is not immediately possible:

  1. Restrict RBAC: Limit who can create/modify Metal3Machine and Metal3DataClaim resources to trusted operators only.
  2. Admission policies: Deploy OPA/Gatekeeper or Kyverno policies that reject CAPM3 resources with cross-namespace references.
  3. Network policies: While not a direct mitigation, network policies can limit the blast radius of compromised credentials.

Resources

  • https://github.com/metal3-io/cluster-api-provider-metal3/pull/3288, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3294
  • https://github.com/metal3-io/cluster-api-provider-metal3/pull/3317, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3319, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3323
  • https://github.com/metal3-io/cluster-api-provider-metal3/pull/3322, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3325
  • https://github.com/metal3-io/cluster-api-provider-metal3/pull/3327, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3343, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3344
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.11.7"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/metal3-io/cluster-api-provider-metal3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.11.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.12.4"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/metal3-io/cluster-api-provider-metal3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.12.0"
            },
            {
              "fixed": "1.12.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-863"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-29T19:01:05Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nCAPM3 is Metal3\u0027s 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.\n\n## Patched In\n\n- **v1.13.0** (main branch \u2014 all fixes included)\n- **v1.12.5** (all four fixes backported)\n- **v1.11.8** (three of four fixes backported; Metal3DataClaim template restriction not applicable due to missing v1beta2 webhook infrastructure)\n\n## Description\n\nFour related vulnerabilities were identified and fixed:\n\n### 1. Cross-namespace Secret references in Metal3Machine\n\nMetal3Machine 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.\n\n### 2. Cross-namespace BareMetalHost lookups\n\nThe 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.\n\n### 3. Incorrect logical operator in ConsumerRef validation\n\nThe Metal3LabelSync controller used AND logic (\u0026\u0026) when validating BareMetalHost ConsumerRef Kind and Group, meaning it only rejected a ConsumerRef when both Kind and Group were wrong. If only one was incorrect (e.g., wrong Kind but correct Group), the validation passed, potentially allowing unauthorized resources to associate with a BareMetalHost.\n\n### 4. Cross-namespace Metal3DataTemplate references\n\nMetal3DataClaim resources could reference Metal3DataTemplate resources in other namespaces. The controller would reconcile using the referenced template regardless of namespace, allowing data leakage across namespace boundaries.\n\n## Impact\n\nThese vulnerabilities allow cross-namespace resource access within the CAPM3 management cluster. A user with permissions to create or modify Metal3Machine or Metal3DataClaim resources in one namespace could reference secrets, BareMetalHosts, or data templates in other namespaces.\n\nPractical impact is limited because:\n\n- CAPM3 management clusters are typically single-tenant, operated by a single infrastructure/platform team. Namespace boundaries serve as organizational separation (e.g., per workload cluster), not as security isolation between mutually untrusted parties.\n- Exploiting these issues requires RBAC permissions to create or modify CAPM3 infrastructure resources (Metal3Machine, Metal3DataClaim), which are infrastructure-admin privileges not granted to application developers or end users.\n- The accessible resources are limited to Metal3 operational artifacts (bootstrap secrets, network metadata, BareMetalHost associations), not arbitrary cluster secrets.\n\nEnvironments with elevated risk:\n\n- Management clusters where namespace-scoped RBAC is used to delegate infrastructure provisioning to separate teams with different trust levels.\n- Managed service providers using a shared management cluster across multiple customer namespaces.\n\nIn the common single-team deployment model, these issues represent a defense-in-depth gap rather than a directly exploitable privilege escalation.\n\n### Prerequisites for exploitation\n\n- Attacker must have RBAC permissions to create or modify Metal3Machine or Metal3DataClaim resources in at least one namespace.\n- Target resources (secrets, BareMetalHosts, templates) must exist in other namespaces on the same management cluster.\n\n## Workarounds\n\nIf upgrading is not immediately possible:\n\n1. Restrict RBAC: Limit who can create/modify Metal3Machine and Metal3DataClaim resources to trusted operators only.\n2. Admission policies: Deploy OPA/Gatekeeper or Kyverno policies that reject CAPM3 resources with cross-namespace references.\n3. Network policies: While not a direct mitigation, network policies can limit the blast radius of compromised credentials.\n\n## Resources\n\n- https://github.com/metal3-io/cluster-api-provider-metal3/pull/3288, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3294\n- https://github.com/metal3-io/cluster-api-provider-metal3/pull/3317, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3319, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3323\n- https://github.com/metal3-io/cluster-api-provider-metal3/pull/3322, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3325\n- https://github.com/metal3-io/cluster-api-provider-metal3/pull/3327, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3343, https://github.com/metal3-io/cluster-api-provider-metal3/pull/3344",
  "id": "GHSA-rf84-wr5g-m3rp",
  "modified": "2026-05-29T19:01:06Z",
  "published": "2026-05-29T19:01:05Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/security/advisories/GHSA-rf84-wr5g-m3rp"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3288"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3294"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3317"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3319"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3322"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3323"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3325"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3327"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3343"
    },
    {
      "type": "WEB",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3/pull/3344"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/metal3-io/cluster-api-provider-metal3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "CAPM3 vulnerable to Cross-Namespace resource access"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.