CVE-2026-50125

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

Published Sep 17, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability arises because MKP's default HTTP endpoint allows unauthenticated requests to the get_resource tool, which accepts limitBytes and tailLines parameters for pod logs. The code parses these parameters as unbounded int64 values and copies the resulting log stream into an in‑memory buffer without an application‑side cap. As a consequence, a remote attacker who can reach the default port 8080 can request an arbitrarily large log segment and force the server to allocate several gigabytes of memory, ultimately exhausting process memory, terminating the MKP server, and causing a denial of service for the MCP service.

Affected Systems

StacklokLabs' MKP server version 0.4.0 and earlier are affected. The issue exists in the cmd/server/main.go module which exposes the default HTTP endpoint and in pkg/mcp/server.go that registers the unauthenticated get_resource tool. Upgrading to version 0.4.1 or later resolves the problem. The unbounded log read can be triggered only when the attacker can access the default port 8080 of the MCP service.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity impact. The EPSS score of less than 1 % suggests a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. An attacker who can reach the default port can send a single tools/call request containing large limitBytes and tailLines values. Because the request‑frequency limiter does not constrain per‑request volume, the attacker can repeat the attack without rate‑limiting penalties, leading to repeated memory exhaustion and service denial. The attack does not require authentication, making it effectively unauthenticated.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade MKP to version 0.4.1 or later.
  • Restrict network access to the default port 8080 so that only trusted hosts can reach the MCP service.
  • Configure Kubernetes pod log retention or size limits to prevent excessive log accumulation, thereby reducing the data set that could be requested.

Generated by OpenCVE AI on September 19, 2026 at 01:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-qw5r-ppcg-f8rj MKP: Unbounded Pod Log Read via Attacker-Controlled `limitBytes`/`tailLines` Causes Memory Exhaustion
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Stackloklabs
Stackloklabs mkp
Vendors & Products Stackloklabs
Stackloklabs mkp
Type Values Removed Values Added
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.
Title MKP: Unbounded Pod Log Read via Attacker-Controlled `limitBytes`/`tailLines` Causes Memory Exhaustion
Weaknesses CWE-400
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 24, 2026, 8:41 PM
Reserved
Jun 3, 2026, 6:49 PM
Status
Deferred
Published
Sep 17, 2026, 8:16 PM
Modified
Sep 30, 2026, 5:32 PM