[BUG] No authentication or authorization on any API endpoint — full control exposed #19

Closed
opened 2026-05-08 23:46:36 +00:00 by Mark · 0 comments
Owner

Summary

The vllm_mm backend has zero authentication or authorization on any endpoint. The CORS middleware allows all origins (*). Any client that can reach the API host can:

  • List, create, update, and delete model configurations
  • Start and stop model inference processes
  • Upload chat template files (arbitrary file writes)
  • Access GPU and system metrics
  • Proxy inference requests through running models

Affected

All endpoints in backend/app/main.py and all routers.

Risk Level

  • Internal/Dev deployment: The docker-compose uses network_mode: host which exposes ports directly on the host. If the host is reachable on a network, the API is fully open.
  • Production: Not suitable for any multi-tenant or internet-facing deployment without a reverse proxy handling auth.
  1. Add an API key check middleware (simple X-API-Key header check)
  2. Document that for production use, a reverse proxy (nginx, Caddy) should handle authentication
  3. At minimum, add a configuration option to require authentication

Issue #1 (already open) about frontend UX — this is the backend security gap.

## Summary The vllm_mm backend has **zero authentication or authorization** on any endpoint. The CORS middleware allows all origins (`*`). Any client that can reach the API host can: - List, create, update, and delete model configurations - Start and stop model inference processes - Upload chat template files (arbitrary file writes) - Access GPU and system metrics - Proxy inference requests through running models ## Affected All endpoints in `backend/app/main.py` and all routers. ## Risk Level - **Internal/Dev deployment**: The docker-compose uses `network_mode: host` which exposes ports directly on the host. If the host is reachable on a network, the API is fully open. - **Production**: Not suitable for any multi-tenant or internet-facing deployment without a reverse proxy handling auth. ## Recommended Mitigation 1. Add an API key check middleware (simple `X-API-Key` header check) 2. Document that for production use, a reverse proxy (nginx, Caddy) should handle authentication 3. At minimum, add a configuration option to require authentication ## Related Issue #1 (already open) about frontend UX — this is the backend security gap.
Mark closed this issue 2026-05-17 21:11:55 +00:00
Sign in to join this conversation.
No description provided.