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

> 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.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Sep 2026
- **Updated:** 24 Sep 2026
- **Also known as:** GHSA-qw5r-ppcg-f8rj, GO-2026-5978

## 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 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-50125?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/StacklokLabs/mkp` | Go | All versions | 0.4.1 |
| `github.com/StacklokLabs/mkp` | Go | All versions | 0.4.1 |
| `github.com/StacklokLabs/mkp` | Go | All versions | 0.4.1 |

## How do I fix CVE-2026-50125?

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

## Is CVE-2026-50125 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-50125 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50125 exists.

Affected packages and fixed versions:
- github.com/StacklokLabs/mkp (Go): affected all versions; fixed in 0.4.1
- github.com/StacklokLabs/mkp (Go): affected all versions; fixed in 0.4.1
- github.com/StacklokLabs/mkp (Go): affected all versions; fixed in 0.4.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-50125/ (Markdown: https://insights.sbomify.com/CVE-2026-50125/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-50125
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-50125
- OSV: https://osv.dev/vulnerability/CVE-2026-50125

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-50125/
Summaries are generated and may contain mistakes; the official description above is the record.
