Summary
ToolJet database read routes do not adequately verify that an authenticated user belongs to the organization identified in a request. By supplying another organization's identifier, a user may access table schemas, column definitions, and stored row data, including results from join queries.
Affected context
The vulnerability occurs in ToolJet deployments where authenticated users can reach database read routes that accept organization identifiers through URL parameters. Risk is present when those routes retrieve metadata or data for the supplied organization without consistently enforcing membership or authorization checks for the requesting user.
Exploit preconditions
- Attack surface: Authenticated ToolJet database read endpoints
- Required access: A valid user account with access to the affected routes
- Trigger point: A request containing an organization identifier controlled by the caller
- Why exploitation is possible: The server uses the supplied organization context without adequately confirming that the requester is authorized for it
Why this happens
The underlying flaw is a missing authorization check on a multi-tenant resource access path. The application appears to authenticate the requester but does not reliably enforce organization membership before processing organization-scoped database metadata and data queries. This maps to CWE-862: Missing Authorization, and is also characteristic of broken object-level authorization when user-controlled identifiers select resources belonging to another tenant.
Potential impact
- Attackers may enumerate tables and column definitions belonging to other organizations
- Attackers could read stored row data from victim organizations
- Join queries may expose related records across sensitive datasets
- Confidential business, customer, or operational information may be disclosed
- Repeated access can enable cross-tenant data harvesting
General mitigation guidance
Mitigation generally centers on enforcing authorization at every organization-scoped data access boundary.
Common defensive patterns include:
- Derive the organization context from the authenticated session or a server-controlled authorization relationship where possible
- Perform explicit membership and permission checks before metadata access, query construction, and result retrieval
- Apply consistent object-level authorization to tables, columns, rows, and joined resources
- Use deny-by-default policies for missing, ambiguous, or mismatched organization context
- Avoid trusting organization identifiers supplied directly by clients
- Limit database credentials and service permissions according to least privilege
- Add tenant-isolation tests covering direct object references, joins, and error responses
How teams detect issues like this
Organizations can identify this class of issue through:
- Static analysis and code review checks for routes that use client-supplied organization IDs in database queries
- Review signals such as authentication checks without adjacent membership or permission validation
- Tests that compare access results for a user's own organization with requests targeting unrelated organizations
- Dynamic testing of table, schema, row, and join endpoints using authorized and unauthorized organization contexts
- API gateway or policy enforcement that requires a verified tenant context before organization-scoped routes execute
- Monitoring for authenticated users repeatedly requesting organization identifiers outside their normal access scope

