Vulnerabilities in pkg:golang/github.com/metal3-io/cluster-api-provider-metal3

PACKAGE
Advisory Summary

GHSA-rf84-wr5g-m3rp is a MODERATE (CVSS 5.5) remote code execution vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/metal3 io/cluster api provider metal3 libraries in the Go ecosystem. The issue involves capm3 vulnerable to cross-namespace resource access. Remediation is available by upgrading affected packages to version 1.11.8, 1.12.5.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/metal3-io/cluster-api-provider-metal3

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/metal3-io/cluster-api-provider-metal3. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rf84-wr5g-m3rp - MODERATE CAPM3 vulnerable to Cross-Namespace resource access

GHSA-rf84-wr5g-m3rp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rf84-wr5g-m3rp
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/metal3 io/cluster api provider metal3
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix GHSA-rf84-wr5g-m3rp

To remediate this vulnerability, upgrade all affected Github.com/metal3 io/cluster api provider metal3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/metal3-io/cluster-api-provider-metal3 fixed: 1.11.8
Upgrade github.com/metal3-io/cluster-api-provider-metal3 to 1.11.8
github.com/metal3-io/cluster-api-provider-metal3 fixed: 1.12.5
Upgrade github.com/metal3-io/cluster-api-provider-metal3 to 1.12.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/metal3-io/cluster-api-provider-metal3

How to Check if You Are Affected

To determine whether your application is affected by GHSA-rf84-wr5g-m3rp, inspect your project dependencies for Github.com/metal3 io/cluster api provider metal3:

inspect dependencies for github.com/metal3-io/cluster-api-provider-metal3

Analyze the terminal output to locate any version of Github.com/metal3 io/cluster api provider metal3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/metal3 io/cluster api provider metal3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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

GHSA-rf84-wr5g-m3rp Affected Github.com/metal3 io/cluster api provider metal3 Versions

2 component(s)
Fixed Versions:
1.11.81.12.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/metal3-io/cluster-api-provider-metal3
Go
< 1.11.8
1.11.8
github.com/metal3-io/cluster-api-provider-metal3
Go
≥ 1.12.0
< 1.12.5
1.12.5

References

GitHub Advisory / Wiki ADVISORY
https://github.com/metal3-io/cluster-api-provider-metal3/security/advisories/GHSA-rf84-wr5g-m3rp
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3288
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3294
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3317
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3319
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3322
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3323
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3325
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3327
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3343
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3/pull/3344
Github.com/metal3 io/cluster api provider metal3 Source Repository REPOSITORY
https://github.com/metal3-io/cluster-api-provider-metal3

Frequently Asked Questions

What is GHSA-rf84-wr5g-m3rp?
GHSA-rf84-wr5g-m3rp is a security vulnerability in Github.com/metal3 io/cluster api provider metal3 involving CAPM3 vulnerable to Cross-Namespace resource access under CWE-863: Incorrect Authorization.
Which Github.com/metal3 io/cluster api provider metal3 versions are affected?
Affected versions include releases prior to 1.11.8, 1.12.5 across affected packages: github.com/metal3-io/cluster-api-provider-metal3.
What version fixes GHSA-rf84-wr5g-m3rp?
Upgrading to 1.11.8, 1.12.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/metal3-io/cluster-api-provider-metal3 affected?
Yes, github.com/metal3-io/cluster-api-provider-metal3 is affected in releases prior to 1.11.8, 1.12.5. Upgrade your dependency to 1.11.8, 1.12.5 or later.
What is the CVSS score of GHSA-rf84-wr5g-m3rp?
GHSA-rf84-wr5g-m3rp has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with GHSA-rf84-wr5g-m3rp?
GHSA-rf84-wr5g-m3rp is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for GHSA-rf84-wr5g-m3rp?
Run the dependency tree command: 'inspect dependencies for github.com/metal3-io/cluster-api-provider-metal3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rf84-wr5g-m3rp",
  "modified" : "2026-05-29T19:01:06Z",
  "published" : "2026-05-29T19:01:05Z",
  "aliases" : [ ],
  "summary" : "CAPM3 vulnerable to Cross-Namespace resource access",
  "details" : "## Summary\n\nCAPM3 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.\n\n## Patched In\n\n- **v1.13.0** (main branch — 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 (&&) 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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/metal3-io/cluster-api-provider-metal3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.8"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.11.7"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/metal3-io/cluster-api-provider-metal3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.12.0"
      }, {
        "fixed" : "1.12.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.12.4"
    }
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-29T19:01:05Z",
    "nvd_published_at" : null
  }
}