T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- assets/docker-compose.yml:26
- Finding
- Unauthenticated observability services are exposed on all host interfaces<![CDATA[ ## Vulnerability Details **File Location**: `assets/docker-compose.yml:26-61, 68-107`; `assets/config/loki/loki.yml:1-5`; `assets/config/tempo/tempo.yml:5-12` **Vulnerability Type**: Missing authentication and excessive network exposure **Risk Level**: High ### Vulnerable Code ```yaml # assets/docker-compose.yml grafana: image: grafana/grafana-oss:11.4.0 container_name: obs-grafana restart: unless-stopped networks: [obs] ports: - "3000:3000" environment: # No-auth for local dev GF_AUTH_ANONYMOUS_ENABLED: "true" GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin" GF_AUTH_DISABLE_LOGIN_FORM: "true" prometheus: image: prom/prometheus:v3.1.0 container_name: obs-prometheus restart: unless-stopped networks: [obs] ports: - "9091:9090" command: - --config.file=/etc/prometheus/prometheus.yml - --storage.tsdb.path=/prometheus - --storage.tsdb.retention.time=30d - --web.enable-lifecycle - --web.enable-remote-write-receiver loki: image: grafana/loki:3.3.2 container_name: obs-loki restart: unless-stopped networks: [obs] ports: - "3300:3100" tempo: image: grafana/tempo:2.7.1 container_name: obs-tempo restart: unless-stopped networks: [obs] ports: - "4317:4317" - "4318:4318" - "3400:3200" alloy: image: grafana/alloy:v1.5.1 container_name: obs-alloy restart: unless-stopped networks: [obs] ports: - "12345:12345" command: - run - /etc/alloy/config.alloy - --server.http.listen-addr=0.0.0.0:12345 ``` ```yaml # assets/config/loki/loki.yml auth_enabled: false server: http_listen_port: 3100 grpc_listen_port: 9096 ``` ```yaml # assets/config/tempo/tempo.yml distributor: receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 ``` ### Technical Analysis Docker Compose port declarations such as `"3000:3000"` bind to all host interfaces by default, not exclusively to loopbac ...[truncated 1856 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Bind all services intended for local use explicitly to loopback: ```yaml ports: - "127.0.0.1:3000:3000" ``` Apply the equivalent binding to ports 3300, 9091, 3400, 4317, 4318, and 12345. 2. Disable anonymous Grafana administration. Require authentication and assign the least-privileged role: ```yaml GF_AUTH_ANONYMOUS_ENABLED: "false" GF_AUTH_DISABLE_LOGIN_FORM: "false" ``` 3. If anonymous access is essential for disposable development environments, use a viewer role rather than Admin and document that the stack must not run on an untrusted network. 4. Add authentication or an authenticated reverse proxy in front of Loki, Tempo, Prometheus, and Alloy when access outside loopback is required. 5. Remove `--web.enable-lifecycle` and `--web.enable-remote-write-receiver` unless hot reload and remote ingestion are explicitly required. 6. Apply host firewall rules and Docker network segmentation as defense in depth. 7. Add resource limits, ingestion limits, and storage quotas to reduce denial-of-service impact. ]]>
