Summary
Actual's server-side password change endpoint lacks proper authorization checks, enabling any authenticated user to overwrite stored password hashes for certain migrated accounts.
When combined with leftover password authentication records and a client-controlled login method, this flaw can let a low-privilege user authenticate as the migrated admin account on servers that moved from password auth to OpenID Connect.
Affected context
This vulnerability arises specifically in Actual servers that have been migrated from password-based authentication to OpenID Connect while retaining legacy authentication records.
It affects environments where:
- The
/account/change-passwordendpoint remains callable by any authenticated session - The legacy password
authrow for the admin user persists after migration - The login endpoint accepts a client-supplied
loginMethod, allowing password-based login even when OpenID Connect is configured as the active method
In this context, a low-privilege user on such a migrated server can exploit the interaction between these behaviors to gain admin-level access.
Exploit preconditions
- Attack surface: HTTP API of an Actual server, notably:
POST /account/change-password- Login endpoint accepting a
loginMethodparameter - Required access: Any authenticated user account (including those with the
BASICrole); no admin privileges are required initially. - Deployment conditions:
- Server previously used password-based auth and was migrated to OpenID Connect
- The legacy password-based
authrow for the admin user still exists and is not disabled or removed - Login API honors a client-supplied
loginMethodvalue, including"password", regardless of the server's active auth configuration - Trigger point:
- The attacker invokes
POST /account/change-passwordwhile authenticated, targeting the orphaned legacy auth record - The attacker then invokes the login endpoint using
loginMethod: "password"and the newly set password - Why exploitation is possible:
- The password change endpoint does not verify that the caller is authorized to modify the specific auth record being updated (CWE-862 / CWE-284).
- The orphaned password auth row for the admin account remains present post-migration, providing a viable target record.
- The login endpoint trusts a client-controlled
loginMethodparameter, allowing the attacker to force password-based authentication even when OpenID Connect is configured. - All three conditions must align; none of the individual weaknesses alone is sufficient to escalate privileges.
Why this happens
The core bug is a missing authorization check on the /account/change-password endpoint.
The handler allows an authenticated session to update a password hash without verifying that:
- The caller owns the account being modified, or
- The caller has appropriate privileges to change that account's password.
This maps to:
- CWE-862: Missing Authorization – the application skips a required permission check before allowing a sensitive operation.
- CWE-284: Improper Access Control – the system fails to enforce who is allowed to perform password changes for specific auth records.
The other behaviors (retained legacy password auth rows for admin after migration, and client-controlled loginMethod) act as enabling preconditions:
- The orphaned password-based admin auth row gives the missing-authorization bug a high-value target.
- Client control over
loginMethodlets the attacker authenticate via a method the server should no longer expose.
Abstractly, the pattern is: a sensitive state-changing endpoint lacks per-subject authorization and operates on shared or legacy records that remain reachable through an alternate authentication path.
Potential impact
- An authenticated BASIC user could escalate to the admin role by setting and using a known password for the migrated admin account.
- An attacker with any valid account could gain full control over the Actual server instance, including financial data and configuration.
- Admin-level access could allow modification, deletion, or exfiltration of personal finance data managed by the server.
- Compromised admin access could be used to create or manipulate additional user accounts, extending the compromise beyond a single profile.
General mitigation guidance
Mitigations center on enforcing strict authorization for sensitive operations and eliminating exploitable legacy auth paths:
- Apply per-resource authorization checks on all password and credential modification endpoints:
- Verify that the caller is either the account owner or has an explicit administrative privilege.
- Enforce that password changes are scoped to the authenticated subject's own account by default.
- Remove or fully deactivate legacy authentication records when migrating between auth mechanisms:
- Ensure that deprecated auth sources (like old password rows) are either deleted or marked unusable.
- Treat multi-step migrations as a state machine and validate that only one auth method is active per account.
- Harden the authentication flow against client-controlled parameters:
- Derive the authentication method from server-side configuration, not from user input.
- Validate that only allowed login methods are honored in the current deployment mode.
- Implement least privilege within the app:
- Minimize the number of accounts with admin capabilities.
- Separate administrative operations from regular user flows to reduce exposure of sensitive endpoints.
- Introduce defense-in-depth controls such as rate limiting and strong session management for sensitive endpoints, reducing the window and impact of misuse.
How teams detect issues like this
Detection can focus on both code-level and operational signals:
Static and code review strategies
- Search for sensitive endpoints (password changes, role updates, auth configuration) that:
- Do not call a central authorization function, or
- Do not check the relationship between the authenticated subject and the target account.
- Enforce coding guidelines requiring explicit authorization decorators or middleware on:
/account/change-password- Any endpoint that manipulates authentication records or roles.
- Use static analysis rules to flag:
- Direct database updates to auth tables without a preceding authorization check.
- Trust in client-supplied parameters such as
loginMethodthat influence control flow for authentication. - Include migration code in security reviews:
- Look for residual or fallback auth paths left enabled after migrations.
Runtime and log-based strategies
- Monitor logs for:
- Password changes executed by non-admin users affecting accounts other than their own.
- Login attempts specifying unexpected
loginMethodvalues when a single auth mode is configured. - Configure anomaly detection to alert on:
- Sudden admin logins from accounts that previously had only BASIC privileges.
- Repeated password change operations from the same low-privilege session.
Neutral automated tools such as generic SAST, dependency scanners, or custom policy enforcement in CI/CD can help identify missing authorization checks and risky trust in client-supplied auth parameters before deployment.

