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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-14T18:09:48.000Z
- Modified: 2026-09-30T17:32:07.107Z
- Also known as: GHSA-qw5r-ppcg-f8rj, GO-2026-5978
- Weaknesses: CWE-400
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- StacklokLabs mkp: < 0.4.1
- github.com/StacklokLabs/mkp (Go): before 0.4.1

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/StacklokLabs/mkp/security/advisories/GHSA-qw5r-ppcg-f8rj> (exploit, advisory, web)
- <https://github.com/StacklokLabs/mkp/commit/37bf6bac862aa3b1c71b8aa1b8364eae7818962d>
- <https://github.com/StacklokLabs/mkp> (package)

## Sources

- CVE List: [CVE-2026-50125](https://www.cve.org/CVERecord?id=CVE-2026-50125), CVE Terms of Use, modified 2026-09-24
- GitHub Advisory Database: [GHSA-qw5r-ppcg-f8rj](https://github.com/advisories/GHSA-qw5r-ppcg-f8rj), CC-BY-4.0, modified 2026-07-21
- Go Vulnerability Database: [GO-2026-5978](https://pkg.go.dev/vuln/GO-2026-5978), CC-BY-4.0, modified 2026-07-21
- NVD: [CVE-2026-50125](https://nvd.nist.gov/vuln/detail/CVE-2026-50125), Public domain, modified 2026-09-30

---

Page: https://cve.day/CVE-2026-50125 · Whole record: https://cve.day/CVE-2026-50125.json · Rebuilt by cve.day 2026-11-25T22:59:39.504Z
