Skip to content

Don't confirm Kubernetes or Consul exposure from generic JSON - #36

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-f831
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-f831

Conversation

@cursor

@cursor cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

check_kubernetes_noauth treated any HTTP 200 whose JSON body contained a "versions" key as confirmed CRITICAL anonymous kube-apiserver access. check_consul_noauth treated any JSON object on GET /v1/catalog/services as confirmed HIGH unauthenticated Consul.

Fusion maps every service_probe_result finding to source=probe + high reliability, and the gate pins those as un-droppable. A false CRITICAL/HIGH therefore lands in the report, HackerOne export, and executive summary.

Sibling checks already require distinctive identity (ApiVersion for Docker, cluster_name/elasticsearch for ES, node/peerURLs for etcd). These two did not.

Trigger: --probe / --full (or any GUI scan) against a host with 6443 or 8500 open:

  • 6443: any HTTPS/HTTP API that answers GET /api with {"versions":["v1"]} (versioned REST, API gateway, mock)
  • 8500: any handler that answers GET /v1/catalog/services with {} or {"status":"ok"}

Root cause

Kubernetes confirmation was "versions" in body after a loose pre-check. Consul confirmation was body.strip().startswith("{") plus json.loads — no catalog shape, no X-Consul-Index.

Fix

  • Kubernetes: require kind == "APIVersions" or serverAddressByClientCIDRs, and a versions list.
  • Consul: require map[string][]string catalog values plus X-Consul-Index or the default consul service.

Validation

python3 -m pytest test_probers.py test_hardening.py test_fusion_engine_bridge.py test_service_enum.py -q — 105 passed.

New cases: generic {"versions":["v1"]} / {"status":"ok"} rejected; real kube-apiserver APIVersions still CRITICAL; real Consul catalog still HIGH; 401 still means auth enforced.

Open in Web View Automation 

check_kubernetes_noauth treated any HTTP 200 whose body contained a
"versions" key as anonymous kube-apiserver access (CRITICAL).
check_consul_noauth treated any JSON object on /v1/catalog/services as
an open Consul API (HIGH). Fusion pins both as un-droppable.

Require kube-apiserver identity (kind=APIVersions or
serverAddressByClientCIDRs plus a versions list) and Consul catalog
shape (tag lists plus X-Consul-Index or the default consul service).

Co-authored-by: dmitryflynn <dmitryflynn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant