llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · tooljet

GHSA-RHM7-C77Q-G5CQ

Cross-tenant data-query execution via app-runtime run path (POST /api/data-queries/:id/run) — missing org/datasource authorization

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
6.1
Media
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición11 dDesde la divulgación, 9 nov 2026, 6:37 a. m.
Detección11 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
9 nov 26
20 nov 26
21 nov 26
9 nov 26
12 nov 26
15 nov 26
18 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-RHM7-C77Q-G5CQ divulgada · CVSS 6.1 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

The authenticated app-runtime endpoint `POST /api/data-queries/:id/run` resolves the target app by data-query id with no organization scoping (`QueryAuthGuard` calls `appRepository.findByDataQuery(id)` with no organizationId, query-auth.guard.ts#L32), and its only authorization gate `AppFeatureAbilityGuard` builds a casl ability whose End User catch-all branch grants `RUN_VIEWER` on every `App` instance with no app-id and no organization condition (data-query-app.ability.ts#L90-93). Any authenticated non-admin/non-builder user ("End User") of any organization can therefore execute the pre-defined data queries of any app in any OTHER organization, run them against that app's datasource with the datasource's full server-side-decrypted credentials, and receive the results.

This is the query-execution analog of the already-accepted advisory GHSA-x7qj-hfg8-p4cw (cross-tenant credential decryption via POST /api/data-sources/decrypt missing org scoping). The boundary is one ToolJet otherwise enforces: the builder run path `runQueryOnBuilder` (controller.ts#L104-134) carries `ValidateQueryAppGuard` (which scopes the app lookup to `user.organizationId`, validate-query-app.guard.ts#L40) AND `DataSourceFeatureAbilityGuard`; the direct datasource routes carry `ValidateDataSourceGuard`. The app-runtime run path drops both.

Execution: `runQueryForApp` (service.ts#L278) -> `runAndGetResult` (mode view, env undefined) -> `DataQueryUtilService.runQuery` -> `appEnvironmentUtilService.getOptions(dataSource.id, organizationId, undefined)` resolves the default-environment decrypted datasource credentials for the query's org and executes the stored query, returning results. No per-user datasource permission, no app-membership, and no released-version restriction is applied.

Impact: cross-tenant confidentiality breach (read any other org's datasource query results) plus within-tenant horizontal escalation (run apps never shared to the End User). The query body is builder-defined (not arbitrary SQL), but attacker-supplied `resolvedOptions` runtime params shape parameterized REST/GraphQL/SQL queries and results return verbatim.

Affected version: <= v3.20.181-lts (the current latest release as of 2026-06-17; both query-auth.guard.ts and data-query-app.ability.ts are byte-identical at v3.20.181-lts and v3.20.169-lts, confirming the 3.20.178 org-scoping fix for GHSA-x7qj-hfg8-p4cw covered only POST /api/data-sources/decrypt and did NOT sweep this data-queries run path).

Remediation: (1) resolve the app with `findByDataQuery(id, user.organizationId)` in QueryAuthGuard and reject org mismatch (mirror ValidateQueryAppGuard); (2) constrain the End User `RUN_VIEWER` rule to `viewableAppsId`/released apps via a casl condition; (3) re-introduce a datasource ability check on the app-runtime path for non-public apps.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:L
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
6.4/ 10Medio
Vector 6.4 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
tooljet≤ 3.20.181-lts
0.0.1-security.1
3.20.181-lts
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmtooljet
Sin parche — — 0.0.1-security.1 afectada
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/ToolJet/ToolJet/security/advisories/GHSA-rhm7-c77q-g5cq

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.