Executive brief
The MKP (Model Context Protocol for Kubernetes) server, which helps manage Kubernetes cluster data, contains a flaw that allows an unauthenticated attacker to crash the service. By requesting extremely large log files from a container, an attacker can force the server to use up all available memory, leading to a complete service outage. This can disrupt operations for any team relying on MKP for cluster monitoring and observability.
Technical details
The vulnerability is located in the `get_resource` MCP tool within `pkg/k8s/subresource.go`. The server parses user-supplied `limitBytes` and `tailLines` parameters as `int64` values without enforcing any upper bounds. These values are passed to the Kubernetes API, and the resulting log stream is read into an in-memory `bytes.Buffer` using `io.Copy`. Because there is no application-side size limit, a single crafted `tools/call` request can trigger an Out-of-Memory (OOM) kill. The vulnerability is exploitable remotely without authentication in the default configuration. Version 0.4.1 introduces hard caps on log retrieval sizes to mitigate this issue.
Affected products
- StacklokLabs mkp < 0.4.1
Timeline
- 2026-06-10: disclosed: Initial disclosure on GitHub
- 2026-07-14: advisory: Advisory published/updated