Skip to content

tiny-http-mcp-server: maxConcurrentToolCalls defaults to unbounded (v2-M9 HTTP side, needs executed re-audit) #628

Description

@kamilio

Found during the safe-bash deep pentest (v3) as an adjacent-scope spot check (MCP transport perimeter carries the risk since packages/safe-bash-mcp was deleted). Code-inspection only, NOT execution-verified — flagged for re-audit.

Severity: Medium (provisional) — threat (d): unbounded concurrent tool calls per HTTP MCP session

Summary

v2 finding M9 (unbounded concurrency) is partially fixed: the stdio transport now caps pending messages (maxPendingStdioMessages ?? 128, server.ts:130/:796), but the HTTP transport's maxConcurrentToolCalls still defaults to undefined (http-transport.ts:181-185) — unbounded concurrent tool calls per session. Also not found: the stdio line-length cap (v1 #10). Related v2 findings verified fixed by inspection: M8 (maxSessions ?? 128, maxSessionsPerSubject ?? 16, sessionTtlMs ?? 15min, http-transport.ts:167-171) and H18 (StdioOutput with maxStdioOutputBytes ?? 1 MiB, server.ts:129, stdio-output.ts:17).

Location

  • packages/tiny-http-mcp-server/src/http-transport.ts:181-185maxConcurrentToolCalls defaults to undefined

Suggested fix

Default maxConcurrentToolCalls to a finite value (e.g. 8–16) consistent with the stdio cap; add the stdio line-length cap. Then execution-verify with a concurrent-calls PoC.

Status: v2-M9 STILL OPEN (HTTP side), inspection-only — needs executed re-audit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions