CVE-2026-50125 MKP: Unbounded Pod Log Read via Attacker-Controlled `limitBytes`/`tailLines` Causes Memory Exhaustion

High 7.5 Published Updated

A remote attacker can exhaust memory and crash the MKP Kubernetes MCP server by sending unbounded log read requests via the unauthenticated get_resource tool.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-50125?

CVE-2026-50125 is a high-severity denial of service vulnerability in StacklokLabs mkp, published on 17 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

MKP is a Model Context Protocol server for Kubernetes. Prior to 0.4.1, cmd/server/main.go exposes the default HTTP endpoint and pkg/mcp/server.go registers the unauthenticated get_resource tool, which accepts attacker-controlled limitBytes and tailLines values for the pods logs subresource. buildPodLogOpts() in pkg/k8s/subresource.go parses those values as unbounded int64 parameters, and defaultGetPodLogs() copies the returned Kubernetes log stream through io.Copy into an in-memory bytes.Buffer without an application-side cap. A remote attacker who can reach the default port 8080 MCP endpoint and select a pod with sufficiently large accumulated logs can send one tools/call request that causes large allocations and additional response copies, while the request-frequency limiter does not constrain per-request volume. This can exhaust process memory, terminate the MKP server, and deny the MCP service; observed testing showed more than one GiB of RSS growth while handling a 128 MiB requested stream. This issue is fixed in version 0.4.1.

Weakness: CWE-400

Which versions are affected by CVE-2026-50125?

3 open source packages ship an affected version, including github.com/StacklokLabs/mkp.

PackageAffectedFixed in
github.com/StacklokLabs/mkp GoAll versions0.4.1
github.com/StacklokLabs/mkp GoAll versions0.4.1
github.com/StacklokLabs/mkp GoAll versions0.4.1

How do I fix CVE-2026-50125?

Upgrade github.com/StacklokLabs/mkp to 0.4.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-50125 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50125 exists.

Sources

Also known as GHSA-qw5r-ppcg-f8rj, GO-2026-5978.

Is CVE-2026-50125 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free