Summary
OpenReception versions before 1.0.2 expose a tenant's live PostgreSQL connection string, including database credentials, to an authenticated administrator for that tenant. If the exposed database endpoint is reachable, the credentials may allow access to other tenants' databases, central application records, and—when a superuser account is used—additional database-host capabilities.
Affected context
The issue occurs in deployments where the GET /api/tenants/{id} endpoint returns the complete tenant record to an authenticated TENANT_ADMIN associated with that tenant. The returned record includes databaseUrl, which may contain a live PostgreSQL username, password, host, and port. Exploitation becomes materially more severe when the PostgreSQL service is reachable from the attacker's environment and the configured account has broad privileges.
Exploit preconditions
- Attack surface: Authenticated tenant administration API and the PostgreSQL service
- Required access: A valid
TENANT_ADMINaccount for at least one tenant - Trigger point: Retrieval of the tenant record through
GET /api/tenants/{id} - Additional condition: The disclosed database endpoint and credentials must be usable from the attacker's reachable network path
- Why exploitation is possible: The API exposes credentials that allow direct database access, bypassing application-level tenant scoping and potentially granting access to all databases managed by the PostgreSQL instance
Why this happens
The underlying flaw is excessive disclosure of a secret-bearing configuration field through an authenticated tenant-management response.
Returning databaseUrl exposes the database connection details required for direct authentication. This maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, because a credential intended for backend use is disclosed to a tenant administrator who does not require it to perform normal tenant administration. Once disclosed, application-level query restrictions no longer provide effective isolation because database access occurs outside the application authorization boundary.
Potential impact
- An attacker may read appointment ciphertexts, key shares, and metadata belonging to other tenants.
- An attacker could access central user records, including administrator account data, password hashes, or session records.
- An attacker may modify or delete data across tenant databases.
- A superuser-scoped database account could enable server-file access, program execution through database features, or further compromise of the database container.
- The vulnerability could undermine the application's intended per-tenant isolation and confidentiality guarantees.
General mitigation guidance
Mitigation generally focuses on preventing secret-bearing connection details from crossing the application trust boundary.
Common defensive patterns include:
- Excluding
databaseUrl, passwords, and other backend credentials from tenant-facing API responses. - Returning explicit response DTOs or allowlisted fields instead of serializing complete tenant records.
- Keeping database credentials in a protected secret-management mechanism that is not readable through tenant administration APIs.
- Using dedicated, non-superuser database accounts with only the permissions required by the application.
- Enforcing network segmentation so tenant-accessible application paths cannot reach database services directly.
- Applying separate credentials and privilege boundaries across central and tenant databases where practical.
- Reviewing existing API responses and logs for accidental credential disclosure, and rotating any credentials that may have been exposed.
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis and schema review for API handlers that serialize database configuration or secret-bearing objects.
- Code review checks for response models that include passwords, connection strings, tokens, private keys, or internal service endpoints.
- API contract tests asserting that tenant-scoped responses exclude backend credentials and infrastructure details.
- Dynamic testing that inspects authenticated responses for secret patterns such as PostgreSQL URLs, passwords, and private network endpoints.
- Policy enforcement that blocks secrets from API schemas, structured logs, and client-visible error responses.
- Database network monitoring for connections originating from application paths or identities that should not perform direct tenant-database access.

