Beszel has an IDOR in hub API endpoints that read system ID from URL parameter
Date: 2026-04
Affected: go/github.com/henrygd/beszel
Attack vector: info-disclosure
Category: vulnerability-disclosure
Severity: Low
CVE: CVE-2026-40077
CWE: CWE-184
CVSS: 3.5 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N)

## Summary Some API endpoints in the Beszel hub accept a user-supplied system ID and proceed without further checks that the user should have access to that system. As a result, any authenticated user can access these routes for any system if they know the system's ID. System IDs are random 15 character alphanumeric strings, and are not exposed to all users. However, it is theoretically possible for an authenticated user to enumerate a valid system ID via web API. To use the `containers` endpoints, the user would also need to enumerate a container ID, which is 12 digit hexadecimal string. ## Affected Component - **File:** `internal/hub/api.go`, lines 283–361 - **Endpoints:** - `GET /api/beszel/containers/logs?system=SYSTEM_ID&container=CONTAINER_ID` - `GET /api/beszel/containers/info?system=SYSTEM_ID&container=CONTAINER_ID` - `GET /api/beszel/systemd/info?system=SYSTEM_ID&service=SERVICE_NAME` - `POST /api/beszel/smart/refresh?system=SYSTEM_ID` - **Commit:** c7261b56f1bfb9ae57ef0856a0052cabb2fd3b84 ## Vulnerable Code The `containerRequestHandler` function retrieves a system by ID but never verifies the authenticated user is a member of that system: ```go // internal/hub/api.go:283-305 func (h *Hub) containerRequestHandler(e *core.RequestEvent, fetchFunc func(*systems.System, string) (string, error), responseKey string) error { systemID := e.Request.URL.Query().Get("system") containerID := e.Request.URL.Query().Get("container") if systemID == "" || c


Mitigations:

Architectural layers (MAESTRO):