How to fix: Kubernetes API Server Publicly Reachable
The response body matches the structural shape of the Kubernetes API server's meta/v1.Status object (kind, apiVersion, a numeric HTTP code, and a machine-readable reason together) or its /version endpoint (gitVersion, gitCommit, and gitTreeState together), confirming a live Kubernetes control plane is reachable from the public internet.
Why it matters
Even when RBAC correctly denies the request, having the control plane API directly reachable from the internet expands the attack surface for anonymous-auth misconfigurations, unpatched API server CVEs, and credential brute forcing. The /version endpoint additionally fingerprints the exact Kubernetes build, letting an attacker match it against known CVEs without further probing.
Managed Kubernetes offerings (EKS, GKE, AKS) often expose the API server on a public endpoint by default. A correctly configured cluster returns a 'Forbidden' Status object to anonymous requests rather than real data, but the server's mere reachability from any source on the internet is itself the finding: production clusters should generally sit behind a private endpoint, IP allowlist, or VPN.
How to fix it
- 1Switch the cluster to a private API server endpoint (EKS private endpoint, GKE private cluster, or AKS private cluster) where possible.
- 2If a public endpoint is required, restrict it to an authorized IP allowlist (EKS public_access_cidrs, GKE authorized networks).
- 3Confirm anonymous-auth is disabled or scoped to only the discovery endpoints your tooling needs: --anonymous-auth=false on self-managed clusters.
- 4Audit RBAC bindings for system:anonymous and system:unauthenticated to ensure they only grant discovery, never read/write on real resources.
Code examples
EKS: restrict public access to known IPs (Terraform)
resource "aws_eks_cluster" "main" {
# ...
vpc_config {
endpoint_public_access = true
public_access_cidrs = ["203.0.113.0/24"]
endpoint_private_access = true
}
}Self-managed: disable anonymous auth
# kube-apiserver flag
--anonymous-auth=falseReferences
Detected automatically by VulnRadar. The check id is kubernetes-api-server-exposed, stable across every scan so you can filter or diff on it.
More info disclosure checks
- MediumRails Session Cookie Missing HttpOnly Flag
- InfoServer header truncated
- InfoPHP session cookie naming exposes runtime
- Infoconfig.js / settings.js referenced (verify contents)
- Infoenv.js / environment.js referenced (verify contents)
- InfoSitemap.xml publicly accessible
- InfoOpenAPI schema version exposed in URL
- LowCORS exposes internal CDN hostname
Questions
- How severe is Kubernetes API Server Publicly Reachable?
- VulnRadar rates this medium severity in the info disclosure category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id kubernetes-api-server-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Kubernetes API Server Publicly Reachable map to?
- It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.