Summary
OpsTree REMS has a missing authentication check affecting Governance API endpoints, including /api/v1/databases. If an affected endpoint is reachable, a remote attacker may access it without an Authorization header or with an invalid or tampered JWT, potentially retrieving stored database connection details.
Affected context
The issue occurs in OpsTree REMS Governance API deployments where requests to affected endpoints are not properly authenticated. The reported endpoint includes /api/v1/databases; exposure depends on the endpoint being reachable by an attacker and the authentication checks failing to reject unauthenticated or invalidly authenticated requests.
Exploit preconditions
- Attack surface: Remotely reachable Governance API endpoints
- Required access: No valid account or token is required if the authentication weakness is present
- Trigger point: A request to an affected endpoint, such as
/api/v1/databases - Why exploitation is possible: The endpoint may return data without enforcing valid authentication, including when the Authorization header is absent or a JWT is invalid or tampered with
Why this happens
The underlying issue is an absent or ineffective authentication check on sensitive API operations. This maps to CWE-306: Missing Authentication for Critical Function, where a function that requires identity verification can be reached without that verification. Authentication should be enforced consistently before protected data is accessed or returned.
Potential impact
- An attacker may retrieve stored database hostnames and usernames.
- Database passwords or other connection secrets could be exposed.
- Exposed credentials could enable unauthorized access to connected databases, depending on their privileges and network accessibility.
- Disclosure of connection details could support further attacks against related systems.
General mitigation guidance
Defensive patterns include requiring authentication for every sensitive endpoint and rejecting requests with missing, invalid, expired, or tampered credentials. Apply authorization checks after authentication to limit access to only the identities and roles that need it. Avoid exposing secrets through API responses, reduce the privileges of database accounts, and limit network access to the API and connected databases.
How teams detect issues like this
- Review API routes and middleware to confirm that sensitive endpoints consistently enforce authentication and authorization.
- Use static analysis and code review to identify handlers that return protected data without an explicit access-control check.
- Add automated tests for requests with no token, invalid tokens, and insufficient privileges; verify that they are rejected.
- Monitor API logs for unauthenticated requests to sensitive routes and apply gateway policies that require valid authentication.

