GHSA-FH59-QRP9-3R65
Low-privilege query execution can receive plaintext workspace secrets in REST query metadata
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-FH59-QRP9-3R65 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
In ToolJet CE `v3.20.188-lts` and `v3.20.189-lts`, a low-privilege app/query viewer can run a REST
query and receive backend-generated request metadata containing resolved
plaintext `{{secrets.*}}` values.
The same low-privilege user cannot read decrypted organization constants
directly: the decrypted constants endpoint returns `403`, and the normal
constants list returns masked values. However, when stored REST query options
place a secret placeholder in URL parameters or a non-redacted request header,
ToolJet resolves the secret before plugin execution and serializes the resolved
value back in `metadata.request`.
This is not a generic SSRF claim and does not require contacting any public or
third-party service. The PoC uses a local echo container on the same Docker
network only to make the request metadata deterministic.
Details
Tested version:
- ToolJet CE Docker images: `tooljet/tooljet-ce:v3.20.188-lts` and `tooljet/tooljet-ce:v3.20.189-lts`
- Latest LTS tags tested locally: `v3.20.188-lts` and `v3.20.189-lts`
- Local-only Docker environment
- No ToolJet Cloud, public ToolJet instance, customer system, or third-party
Relevant code path:
- `server/src/modules/data-queries/controller.ts`
- `POST /data-queries/:id/run`
- protected by `RUN_VIEWER` app/query execution permissions
- data-query app/source abilities
- allow users with app execution access to run the query
- data-query util service
- resolves `{{constants.*}}`, `{{secrets.*}}`, and server globals before
- `plugins/packages/restapi/lib/index.ts`
- serializes `metadata.request` from the actual outbound request after
- `plugins/packages/common/lib/utils.helper.ts`
- redacts selected header names such as `authorization`, but does not redact
Expected behavior:
- Decrypted secret constants should not be returned to a user who lacks
Actual behavior:
- A low-privilege query viewer receives the plaintext secret in
PoC
I used only a local ToolJet Docker environment, a local Docker-network echo
server, and a marker secret. No public ToolJet instance, ToolJet Cloud tenant,
external service, customer data, real credential, SSRF bypass, RCE,
persistence, or destructive payload was used.
Attachment:
- `query-metadata-secret-reflection-20260629.zip`
- SHA-256:
Attachment root:
- `query-metadata-secret-reflection-20260629/`
Key files:
- `query-metadata-secret-reflection-20260629/runtime/run_http_poc.sh`
- `query-metadata-secret-reflection-20260629/runtime/out-echo/summary.json`
- `query-metadata-secret-reflection-20260629/runtime/out-echo/enduser_decrypted_constants.json`
- `query-metadata-secret-reflection-20260629/runtime/out-echo/enduser_masked_constants.json`
- `query-metadata-secret-reflection-20260629/runtime/out-echo/enduser_run_query_reflection.json`
- `query-metadata-secret-reflection-20260629/runtime/out-echo/enduser_run_missing_secret.json`
- `query-metadata-secret-reflection-20260629/evidence-index.md`
High-level reproduction:
- Start local ToolJet CE `v3.20.188-lts` or `v3.20.189-lts`.
- Start a local Docker-network echo server.
- Create an admin-owned app and REST API query.
- Store `{{secrets.TJ_SECRET_MARKER_20260629}}` in query URL params,
- As the low-privilege end-user, confirm the direct decrypted constants
- As the same end-user, confirm the normal constants endpoint returns only
- Run the query as the low-privilege end-user.
- Observe `metadata.request.params.marker` contains the plaintext secret.
- Observe `metadata.request.headers["x-secret-marker"]` contains the plaintext
- Confirm a missing-secret control query does not return the expected marker.
- Confirm `metadata.request.headers.authorization` is redacted, so this is a
Important evidence:
{
"statuses": {
"enduser_decrypted_constants": "403",
"enduser_masked_constants": "200",
"enduser_run_query_reflection": "201",
"enduser_run_missing_secret": "201"
},
"controls": {
"masked_constants_contains_plain_secret": false,
"missing_secret_response_contains_plain_secret": false,
"authorization_header_redacted_in_metadata": true
},
"positive": {
"response_contains_plain_secret": true,
"metadata_request_params_marker": "tj_secret_marker_value_20260629",
"metadata_request_headers_x_secret_marker": "tj_secret_marker_value_20260629"
},
"confirmed": true
}Impact
A low-privilege app/query viewer can receive plaintext workspace secrets
through REST query execution metadata even though the same user cannot read
decrypted constants directly.
The preconditions are that the user can run the affected query and that a
stored REST query option references a secret in a reflected field. If ToolJet
intends query metadata to be visible to all query viewers, the missing
security invariant is that decrypted secrets should still be redacted before
that metadata is returned.
Non-claims:
- No public ToolJet target was tested.
- No ToolJet Cloud tenant was tested.
- No third-party service was contacted.
- No SSRF bypass is claimed; the target is a local self-hosted Docker-network
- No arbitrary secret enumeration is claimed without knowing the secret name.
- No RCE, persistence, credential-id decrypt endpoint bypass, or destructive
Relationship to known issues:
This is adjacent to prior datasource secret/decrypt issues and to the separate
OAuth URL secret constant leak, but the endpoint and sink are different. This
report does not use the removed/fixed decrypt endpoint and does not rely on an
SSRF bypass. The sink is REST query execution metadata returned to a
low-privilege query viewer.
Suggested fix:
- Redact resolved `{{secrets.*}}` values from REST query execution metadata
- Treat URL params and arbitrary request headers as metadata fields that can
- Add regression tests for direct decrypted constants denial, masked constants
query-metadata-secret-reflection-20260629.zip https://github.com/user-attachments/files/29498957/query-metadata-secret-reflection-20260629.zip
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmtooljet |
Sin parche | — | — | 0.0.1-security.1 afectada |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/ToolJet/ToolJet/security/advisories/GHSA-fh59-qrp9-3r65Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
