GHSA-RMV5-3XPJ-W885
External table save/delete broadcasts unredacted datasource (plaintext credentials) to the Builder collaboration websocket room
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-RMV5-3XPJ-W885 divulgada · CVSS 5.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Vulnerability Details
`packages/server/src/api/controllers/table/external.ts` broadcasts the raw `Datasource` object returned by `sdk.tables.external.save()`/`sdk.tables.external.destroy()` to every socket in the Builder collaboration room, without redacting connection secrets:
// updateTable()
const { datasource, oldTable, table } = await sdk.tables.external.save(...)
builderSocket?.emitDatasourceUpdate(ctx, datasource) // raw, unredacted
// destroy()
const { datasource, table } = await sdk.tables.external.destroy(...)
builderSocket?.emitDatasourceUpdate(ctx, datasource) // raw, unredactedThe sibling controller `packages/server/src/api/controllers/datasource.ts` already redacts secrets via `sdk.datasources.removeSecretSingle(datasource)` before all 4 of its own `builderSocket.emitDatasourceUpdate()` broadcasts — `external.ts` was simply missing the equivalent call on both of its own broadcast sites. `removeSecretSingle()` is a pre-existing, well-tested redaction helper (`packages/server/src/sdk/workspace/datasources/datasources.ts`) that strips plaintext connection fields (e.g. database passwords, API keys) before a datasource object is exposed to a lower-trust context.
Root Cause
Missing call to the existing `sdk.datasources.removeSecretSingle()` redaction helper before broadcasting a `Datasource` object over the real-time collaboration socket, in two of the (at least) six broadcast call sites in the codebase.
Attack Scenario / Impact
Any user who is a Builder on a given workspace joins that workspace's `builderSocket` room simply by opening the Builder UI for that workspace (standard collaboration feature - shows other builders' cursors/live-edits in real time). If any Builder on that workspace updates or deletes a table backed by an external datasource (e.g. Postgres, MySQL, MongoDB), every other socket in that room - including any Builder with only editor-level, non-admin access to that specific datasource, or even low-privileged workspace members who have Builder access to unrelated resources in the same workspace - receives a `DatasourceChange` broadcast containing that datasource's plaintext connection secret (e.g. database password) in the clear.
Verification
Confirmed via a real integration test: a genuine external Postgres datasource + table were created via the project's own `TestConfiguration` harness, the Builder socket module was mocked to capture broadcast payloads, and a real `PUT` table-update request was issued. Pre-fix, the captured `DatasourceChange` broadcast's `config.password` field equalled the raw plaintext secret set at datasource creation time.
Recommended Fix
Wrap both `datasource` arguments in `await sdk.datasources.removeSecretSingle(datasource)` before calling `builderSocket.emitDatasourceUpdate()`, in both `updateTable()` and `destroy()` in `packages/server/src/api/controllers/table/external.ts` - matching the existing pattern already used 4 times in the sibling `datasource.ts` controller. This is a minimal, low-risk, drop-in fix using an existing, already-tested helper; no behavioural change to the REST API response, only to the websocket broadcast payload.
CWE
CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@budibase/server |
Sin parche | — | — | 3.38.1 afectada |
3.45.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Budibase/budibase/security/advisories/GHSA-rmv5-3xpj-w885Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
