| Title | https://github.com/Michael-A-Kuykendall/ shimmy 2.6.4 Missing Authentication |
|---|
| Description | Missing authentication on the inference API, exposed by the project's own default production deployment templates
### Summary
Shimmy's HTTP server ships with no authentication mechanism of any kind. Every route, including the OpenAI-compatible completion/chat endpoints that run model inference, is reachable by any network client with no token, header, or credential required. The project's own official Docker and Kubernetes deployment templates configure the server to bind `x.x.x.x` and, in the Kubernetes case, expose it through a `LoadBalancer` Service, meaning a deployment that follows the project's documented production setup is open to the public internet with zero access control.
### Details
- `src/server.rs:133-158` builds the Axum router (`/health`, `/api/generate`, `/api/models/*`, `/v1/chat/completions`, `/v1/completions`, `/v1/models`, `/v1/messages`, etc.) and applies exactly one middleware layer: `app.layer(middleware::from_fn(cors_layer))` (`src/server.rs:160`). `cors_layer` (`src/server.rs:14-35`) only sets CORS response headers; it does not inspect or validate the request in any way, and it sets `Access-Control-Allow-Origin: *` unconditionally.
- A full-codebase grep of `src/*.rs` for `Authorization`, `Bearer`, `api_key`, `API_KEY`, or any auth-check construct returns no hits outside of the literal string `"Content-Type, Authorization"` in the CORS allow-list. There is no code path anywhere that rejects a request for lacking credentials.
- `src/main.rs:269-272` prints `x.x.x.x:8080` as a documented valid example for the `--bind` flag's own help text, and `SHIMMY_BIND_ADDRESS`/`SHIMMY_HOST` environment variables exist specifically to set this.
- The project's own templates make this the recommended production configuration, not a hypothetical misconfiguration:
- `templates/docker/Dockerfile`: `ENV SHIMMY_HOST=x.x.x.x` and `CMD ["./shimmy", "serve", "--bind", "x.x.x.x:11435"]`.
- `templates/kubernetes/configmap.yaml` and `templates/kubernetes/deployment.yaml`: `SHIMMY_HOST: "x.x.x.x"`.
- `templates/kubernetes/service.yaml` defines a second Service, `shimmy-loadbalancer`, of `type: LoadBalancer`, forwarding port 80 to the application's port 11435 with no network policy or auth-gating sidecar anywhere in the template set.
- `templates/docker/nginx.conf` provides only rate limiting (`limit_req_zone`) in front of the backend; no authentication directive is present, commented or otherwise.
- The README contains zero mentions of "auth," "api key," or "token" anywhere in its text.
### ???? Steps to Reproduce
(available upon request)
### Impact
Any shimmy deployment that follows the project's own documented Docker or Kubernetes templates exposes a fully unauthenticated inference server to the network the LoadBalancer/exposed port reaches, commonly the public internet in a cloud Kubernetes cluster. An unauthenticated party can: enumerate loaded models, submit arbitrary completion/chat requests consuming GPU/CPU and memory resources without limit (CWE-400, denial of service / resource exhaustion against the host), and, given the wildcard CORS policy, trigger these same requests from any third-party webpage against a shimmy instance reachable from a victim's browser context (CWE-942 permissive cross-origin policy). The core issue is CWE-306, Missing Authentication for Critical Function: there is no optional or default credential mechanism anywhere in the codebase for an operator to enable even if they wanted one.
|
|---|
| Source | ⚠️ https://github.com/Michael-A-Kuykendall/shimmy/issues/221 |
|---|
| User | geochen (UID 78995) |
|---|
| Submission | 10/19/2026 05:03 (1 month ago) |
|---|
| Moderation | 11/09/2026 18:20 (22 days later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 433198 [Michael-A-Kuykendall Shimmy up to 2.6.4 Inference API src/server.rs missing authentication] |
|---|
| Points | 20 |
|---|