GHSA-6C72-FXVV-XP9F
OAuth URL generation can disclose plaintext workspace secret constants across workspaces
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-6C72-FXVV-XP9F divulgada · CVSS 5.2 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
In ToolJet CE `v3.20.188-lts`, any authenticated user can call
`POST /api/data-sources/fetch-oauth2-base-url` and supply request-body
`organization_id`, `environment_id`, and OAuth `source_options` containing
`{{secrets.*}}`. ToolJet resolves the secret constant using the body-supplied
workspace/environment ids and returns the plaintext value inside the generated
OAuth authorization URL.
The local Docker PoC also demonstrates cross-workspace impact. A Workspace A
attacker who cannot switch to Workspace B and does not see Workspace B in the
organization list can still supply Workspace B ids in the request body and
receive a Workspace B secret marker in the returned OAuth URL.
This is not a bypass of the fixed datasource decrypt endpoint. The source is
OAuth URL generation plus organization secret-constant resolution, and the sink
is the returned OAuth authorization URL.
Details
Tested version:
- ToolJet CE Docker image: `tooljet/tooljet-ce:v3.20.188-lts`
- Latest LTS tag tested locally: `v3.20.188-lts`
- Local-only Docker environment
- No ToolJet Cloud, public ToolJet instance, customer system, or third-party
Relevant code path:
- `server/src/modules/data-sources/controller.ts`
- exposes `POST /data-sources/fetch-oauth2-base-url`
- route is authenticated and feature-gated, but does not bind body
- `server/src/modules/data-sources/ability/index.ts`
- grants `GET_OAUTH2_BASE_URL` to authenticated users
- `server/src/modules/data-sources/util.service.ts`
- `getAuthUrl()` resolves `{{constants.*}}` / `{{secrets.*}}` using
- organization constants utility
- decrypts the matched secret constant value
- OAuth plugin helpers such as Slack
- place resolved `client_id` values into the returned authorization URL
Expected behavior:
- A non-admin or low-privilege user should not receive plaintext secret
- A caller authorized in Workspace A should not be able to resolve Workspace B
Actual behavior:
- `{{secrets.NAME}}` in OAuth source options is resolved server-side and
- The body-supplied `organization_id` and `environment_id` drive the secret
PoC
I used only a local ToolJet Docker environment and marker secrets. No public
ToolJet instance, ToolJet Cloud tenant, external service, real credential,
customer data, persistence, reverse shell, or destructive payload was used.
Attachment:
- `oauth-secret-constant-leak-20260629.zip`
- SHA-256:
Attachment root:
- `oauth-secret-constant-leak-20260629/`
Key files:
- `oauth-secret-constant-leak-20260629/runtime/run_http_poc.sh`
- `oauth-secret-constant-leak-20260629/runtime/run_cross_workspace_probe.sh`
- `oauth-secret-constant-leak-20260629/runtime/out/summary.json`
- `oauth-secret-constant-leak-20260629/runtime/out-cross-workspace/summary.json`
- `oauth-secret-constant-leak-20260629/source-semantic-probe/probe-results.json`
- `oauth-secret-constant-leak-20260629/evidence-index.md`
High-level reproduction:
- Start local ToolJet CE `v3.20.188-lts`.
- Create an admin and a low-privilege end-user.
- Create a secret constant named `TJ_SECRET_MARKER_20260629` with value
- As the low-privilege user, confirm the normal constants endpoint returns a
- As the same user, confirm the decrypted constants endpoint returns `403`.
- As the same user, call `POST /api/data-sources/fetch-oauth2-base-url` with:
{
"provider": "slack",
"organization_id": "<workspace-id>",
"environment_id": "<environment-id>",
"source_options": {
"credential_source": { "value": "from_datasource_configuration" },
"client_id": { "value": "{{secrets.TJ_SECRET_MARKER_20260629}}" },
"client_secret": { "value": "unused" }
}
}- Observe the returned URL contains
- For the cross-workspace probe, create a victim Workspace B secret and use a
- Confirm the attacker cannot switch to Workspace B (`401`) and Workspace B is
- Submit the OAuth helper request with Workspace B ids in the body and observe
Important same-workspace evidence:
{
"statuses": {
"attacker_masked_constants": "200",
"attacker_decrypted_constants": "403",
"oauth_no_org_env": "201",
"oauth_wrong_env": "201",
"oauth_missing_secret": "201",
"oauth_leak": "201"
},
"controls": {
"masked_constants_contains_plain_secret": false,
"oauth_without_org_env_contains_plain_secret": false,
"oauth_wrong_env_contains_plain_secret": false,
"oauth_missing_secret_contains_plain_secret": false
},
"positive": {
"oauth_with_org_env_contains_plain_secret": true
},
"confirmed": true
}Important cross-workspace evidence:
{
"statuses": {
"attacker_org_list": "200",
"attacker_switch_victim": "401",
"oauth_cross_workspace": "201"
},
"controls": {
"attacker_org_list_contains_victim_workspace": false,
"attacker_switch_victim_status": "401"
},
"positive": {
"oauth_cross_workspace_contains_victim_secret": true
},
"confirmed": true
}Impact
A low-privilege authenticated user can recover plaintext workspace secret
constants through OAuth URL generation. The local PoC also shows
cross-workspace disclosure when the victim organization id, environment id, and
secret name are known.
This can expose secrets that are otherwise encrypted at rest, masked in normal
constant-list APIs, and blocked by the decrypted constants endpoint for the
same user.
Non-claims:
- No public ToolJet target was tested.
- No ToolJet Cloud tenant was tested.
- No third-party service was contacted.
- No RCE, SSRF bypass, credential-id decrypt endpoint bypass, persistence, or
- The cross-workspace variant requires victim organization/environment ids and
Relationship to known issues:
This is adjacent to prior datasource credential decrypt issues, but this report
does not use the removed/fixed decrypt endpoint and does not use
`credential_id`. The affected path is OAuth URL generation plus organization
secret constants, with the plaintext returned in an OAuth authorization URL.
Suggested fix:
- Do not allow caller-controlled `organization_id` / `environment_id` to drive
- Bind OAuth URL secret resolution to the authenticated user's active
- Do not return resolved secret values in client-visible OAuth URL fields.
- Add regression tests for low-privilege callers, masked/decrypted constants
oauth-secret-constant-leak-20260629.zip https://github.com/user-attachments/files/29491488/oauth-secret-constant-leak-20260629.zip
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
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-6c72-fxvv-xp9fLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
