GHSA-cq9c-6w48-qmfg: @actual-app/sync-server: Disabled OpenID users keep access through existing session tokens
SummaryIn OpenID multi-user mode, disabling a user only blocks future OpenID login for that identity. Existing Actual session tokens for the disabled user remain valid, so the user can continue calling authenticated server endpoints after an administrator has disabled the account.DetailsThe disabled-user check is present during OpenID login finalization. Existing users are only accepted when the matching row has `enabled = 1`, and a disabled row causes the OpenID grant to fail before a new session token is created.The shared session validation path does not perform the same enabled-user check. It accepts any existing token row that has not expired, then returns the session object to every route protected by `validateSessionMiddleware`.This means account disablement and session authorization diverge:The default token expiration setting is `never`, so this is not just a short race after disablement on default deployments.Admins can change a user's enabled state through the user update route, but that update does not delete the user's existing sessions. After the update, the old token still satisfies `validateSession`.Authenticated server features then continue to trust that session. For example, the sync API installs `validateSessionMiddleware` for the whole router, so a disabled user can keep using any sync operation that their still-valid session and existing file ownership/access allow.This is distinct from the previously published cross-user sync authorization issue: the attacker does not need to access another user's file ID. The bypass is that a disabled user's own session remains authorized after account disablement.PoCRun an Actual Sync Server in OpenID multi-user mode with `@actual-app/sync-server` 26.5.0. Use the default token expiration setting, or any setting where the token has not expired yet.Log in as a non-admin OpenID user and save the returned Actual session token.As an admin, disable that same user through `PATCH /admin/users` by sending `enabled: false`.Reuse the old token against a protected endpoint.Example success check:Expected result on the affected code path: the request is still treated as authenticated and returns the disabled user's account/session information instead of `401` or `403`.A sync-facing check uses the same session validation primitive:Expected result on the affected code path: the disabled user can still list and operate on budget files that the stale session is otherwise allowed to access.ImpactA disabled OpenID user can keep post-authentication access until the session row is deleted or expires. With the default `token_expiration: never`, this can persist indefinitely.For a disabled basic user, the confirmed impact is continued access to that user's own budgets and any budgets shared with that user, including sensitive financial data and allowed mutations. For a disabled admin user, the impact is broader because the existing token can still satisfy admin role checks; that condition preserves administrative access after the account was disabled.The missing rule is that session validation should reject disabled users, and disabling or deleting a user should revoke that user's existing sessions.
CVSS v3.1: 8.3