T09 · Insecure Skill Coding Practices
- Location
mcp-server/server.py:251- Finding
Unauthenticated HTTP Service Permits Resource-Exhaustion Denial of Service
- Content
View full analysis
- Remediation
View remediation
MAX_BODY_SIZE: self.send_error(413, "Request body too large") return ``` 3. Configure connection and read timeouts so incomplete or slow requests cannot hold the service indefinitely. 4. Place remotely exposed deployments behind a production reverse proxy that enforces body-size limits, connection limits, rate limiting, TLS, and request timeouts. 5. Require authentication and authorization when the MCP endpoint must be remotely accessible. 6. Restrict requests to the intended endpoint and expected content type, rejecting unsupported paths and non-JSON requests. 7. Use a bounded concurrent server architecture so one slow client cannot prevent all legitimate requests from being processed. Concurrency limits must also be applied to avoid replacing single-request blocking with unbounded thread exhaustion. 8. Limit network access through host firewall rules, private-network binding, or an authenticated gateway. ]]>
