Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ GHSA-h9mw-h4qc-f5jf — kubernetes-graphql-gateway

⚪ Unknown ✅ No Known Exploit CWE-400 OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

kubernetes-graphql-gateway: GraphQL Endpoint Vulnerable to Authenticated Denial-of-Service via Unrestricted Query Execution

CVSS 6.5 Medium — The GraphQL API served by kubernetes-graphql-gateway is vulnerable to Denial-of-Service (DoS) attacks due to a complete absence of query resource controls (depth limiting, complexity analysis, response size capping, and rate limiting). An authenticated attacker can craft queries that force the server to compute and serialize multi-megabyte responses, consuming significant CPU, memory, and network bandwidth. Repeated requests can exhaust server resources and degrade or deny service to legitimate users.

> Note: A previous version of this advisory (based on pre-v1 code) documented an unauthenticated attack surface via an HTTP GET method bypass in the former registry.go. That bypass has been removed in v1 — all requests now require a Bearer token. The CVSS score has been adjusted from 7.5 to 6.5 accordingly (Privileges Required: None → Low). CWE-306 (Missing Authentication for Critical Function) no longer applies.

Root Cause

The kubernetes-graphql-gateway uses the graphql-go/graphql library (v0.8.1) with the graphql-go/handler HTTP handler. The handler is instantiated in gateway/gateway/graphql/graphql.go with only cosmetic configuration — no resource limits:

```go

// gateway/gateway/graphql/graphql.go — CreateHandler()

func (s *GraphQLServer) CreateHandler(schema *graphql.Schema) *GraphQLHandler {

graphqlHandler := handler.New(&handler.Config{

Schema: schema,

Pretty: s.config.Pretty,

Playground: s.config.Playground,

GraphiQL: s.config.GraphiQL,

})

return &GraphQLHandler{

Schema: schema,

Handler: graphqlHandler,

}

}

```

The handler.Config struct does not include MaxDepth, MaxComplexity, MaxResponseSize, or any equivalent fields. Neither the graphql-go/handler nor the underlying graphql-go/graphql library provides built-in query depth or complexity analysis.

The application configuration (gateway/gateway/config/config.go) has no fields for resource limits:

```go

// gateway/gateway/config/config.go — GraphQL config

type GraphQL struct {

Pretty bool

Playground bool

GraphiQL bool

}

```

No rate limiting, throttling, or request size controls exist anywhere in the codebase.

Authentication Model

All requests pass through the HTTP handler in gateway/http/http.go, which extracts a Bearer token and injects it into the request context:

```go

// gateway/http/http.go — Token extraction (applied to all methods)

s.Handle("/api/clusters/{clusterName}", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

clusterName := r.PathValue("clusterName")

authHeader := r.Header.Get("Authorization")

token := strings.TrimPrefix(authHeader, "Bearer ")

ctx := utilscontext.SetToken(r.Context(), token)

ctx = utilscontext.SetCluster(ctx, clusterName)

c.Gateway.ServeHTTP(w, r.WithContext(ctx))

}))

```

The token is enforced at the Kubernetes API layer via gateway/gateway/roundtripper/bearer.go, which returns HTTP 401 for requests without a valid token. However, the GraphQL execution engine (query parsing, schema validation, introspection) still runs before the Kubernetes API is contacted — meaning authenticated users can trigger expensive operations that consume server resources without hitting the K8s API at all.

Attack Vectors

1. Nested Introspection Field Expansion

The GraphQL schema contains 3,508 types (Kubernetes resources + platform CRDs). Introspection meta-fields (__schema, __type) allow recursive field expansion. Each additional nesting level multiplies the response size exponentially. A single full introspection query generates ~5.2 MB of response data in ~1.15s.

2. Parallel Request Amplification

Without rate limiting, an authenticated attacker can issue many concurrent expensive queries. 5 parallel requests generate ~18.6 MB total response in under 4 seconds with no throttling. At scale (e.g. 999 concurrent requests), the backend becomes unresponsive and returns 503 to all users.

3. Subscription Resource Exhaustion

The HandleSubscription() method in gateway/gateway/graphql/graphql.go processes SSE (Server-Sent Events) subscription requests. A malicious authenticated client can open many subscription channels simultaneously, holding server connections and memory indefinitely:

```go

// gateway/gateway/graphql/graphql.go — HandleSubscription()

subscriptionChannel := graphql.Subscribe(subscriptionParams)

for res := range subscriptionChannel {

// ... marshal and flush indefinitely ...

}

```

There is no limit on the number of concurrent subscriptions, no idle timeout, and no per-client connection cap.

4. Deep Query Execution

Authenticated users can submit arbitrarily deep and complex GraphQL queries. The GraphQL execution engine processes the full query — consuming CPU and memor

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

Weakness class

GHSA-h9mw-h4qc-f5jf is classified as CWE-400: Uncontrolled Resource Consumption. A request can consume memory, CPU or storage without limit, exhausting capacity for everyone else.

Affected software

GHSA-h9mw-h4qc-f5jf is recorded against 1 package.

  • github.com/platform-mesh/kubernetes-graphql-gateway

Timeline and source

Published on 8 April 2026 and last revised on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE CWE-400
Public Exploit ✅ No
Source OSV
Published 2026-04-08
Updated 2026-08-20
Modified 2026-06-25
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/platform-mesh/kubernetes-graphql-gateway

Similar Threats

Free Vulnerability Check

Is your site affected by GHSA-h9mw-h4qc-f5jf?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-h9mw-h4qc-f5jf and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.