Summary
OpsTree REMS through 1.0.0 has an authentication bypass in its login flow: a client-controlled is_local_auth field can result in a valid JWT being issued without successful password verification. An unauthenticated attacker who can reach the login endpoint may use this behavior to gain SuperUser administrative access.
Affected context
The issue affects the OpsTree REMS login flow through version 1.0.0. It becomes risky when the login endpoint is reachable by an attacker and the server trusts the client-controlled is_local_auth value when deciding whether to issue a JWT, rather than requiring verified credentials.
Exploit preconditions
- Attack surface: The application's user login API must be reachable.
- Required access: No authenticated account is required.
- Trigger point: Authentication processing for a login request involving the admin account.
- Why exploitation is possible: The server accepts a client-controlled authentication-mode field in a way that can bypass password verification and issue a valid JWT.
Why this happens
The underlying flaw is an authentication decision based on untrusted, client-supplied state. If a client-controlled field can select or assert a trusted authentication path without independent server-side verification, the application may issue credentials without proving the user's identity. This is an authentication bypass mapped to CWE-287: Improper Authentication.
Potential impact
- An unauthenticated attacker may obtain a valid JWT.
- An attacker could gain SuperUser administrative access.
- Administrative access may allow unauthorized changes to application data or settings.
- Compromised administrative access can lead to further exposure of users or connected systems.
General mitigation guidance
Defensive patterns focus on making authentication decisions exclusively on the server and requiring verified identity evidence before issuing tokens.
- Do not let client-controlled fields select or assert a trusted authentication method.
- Require successful credential verification or an equivalent trusted authentication result before issuing JWTs.
- Apply authorization checks and least privilege independently of token issuance.
- Use secure-by-default authentication flows and reject requests with ambiguous or unsupported authentication state.
- Limit access to login endpoints where appropriate, while treating such restrictions as defense in depth rather than a substitute for correct authentication.
How teams detect issues like this
- Review login handlers for branches that trust client-supplied authentication flags or skip credential verification.
- Use static analysis and code review rules to identify token issuance paths that can be reached without a verified authentication result.
- Monitor authentication events for tokens issued without corresponding successful credential checks, especially for privileged accounts.
- Enforce policies requiring server-side identity verification before JWT creation; automated security review tools may help identify violations.

