Skip to content

security: WebSocket fan-out broadcasts sweep records that lack user_id to every connected user #1600

Closed

Description

@scttfrdmn

From the pre-1.0 security audit (spore-host/spore-host#649, 2026-11-11), audit id tenant-12. Verified: confirmed, severity low (reviewer said low).

Where: lambda/dashboard-websocket-processor/main.go:104 (at origin/main on 2026-11-11)

Evidence

if userID != "" && conn.UserID != userID { continue }: an empty user_id skips the filter, and the full NewImage (every string/number attribute, including aws_account_id and s3_params_key) is posted to all connections.

Scenario

A sweep record written without user_id goes to every open dashboard socket, exposing another tenant's account ID, params location and progress. That covers legacy schedules (scheduler-handler copies schedule.UserID, which can be empty), a manual write, or a future writer that omits it.

Verifier

spawn lambda/dashboard-websocket-processor/main.go:104 checks if userID != "" && conn.UserID != userID { continue }, so it fails open: a record with an empty user_id goes to every active connection. Exposure depends on whether such records exist. scheduler-handler/main.go:278/324 copies schedule.UserID, which may be empty for legacy schedules. Latent.

Suggested fix

Fail closed: drop any record whose user_id is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions