llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @budibase/server

GHSA-76M3-47V8-P7H6

Budibase: Cross-workspace Chat Identity Link disclosure via unscoped GET /api/chat-links

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

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
10 sept 26
9 oct 26
18 nov 26
20 nov 26
10 sept 26
28 sept 26
15 oct 26
2 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-76M3-47V8-P7H6 divulgada · CVSS 7.7 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

`GET /api/chat-links` (and `GET /api/chat-links?provider=<provider>`, without an
`agentId`) returns every Chat Identity Link record for the entire tenant, spanning
*every workspace's* AI chat agents - not just the workspace the requester actually has
builder/admin access to. A builder who only administers one small workspace can use this
endpoint to enumerate the Slack/Microsoft Teams/Discord/Telegram identity-linking data of
every other workspace in the same tenant.

Root cause

Auth gate: the route is registered under `builderAdminRoutes`
(`packages/server/src/api/routes/chat.ts:18-19`), which resolves to the
`builderOrAdmin` middleware
(`packages/backend-core/src/middleware/builderOrAdmin.ts`):

export async function builderOrAdmin(ctx: UserCtx, next: any) {
  if (ctx.internal || isAdmin(ctx.user)) {
    return next()
  }
  const workspaceId = await getWorkspaceIdFromCtx(ctx)
  ...
  } else if (workspaceId && !isBuilder(ctx.user, workspaceId)) {
    ctx.throw(403, "Workspace Admin/Builder user only endpoint.")
  }
  return next()
}

`workspaceId` here is whatever the *caller* supplies (the `x-budibase-app-id` header, a
query `appId`, etc. - see `getWorkspaceIdFromCtx`,
`packages/backend-core/src/utils/utils.ts:89`). This only proves the caller is a builder
of some workspace of their own choosing - it says nothing about which other
workspaces exist in the tenant.

Handler: `listChatIdentityLinks`
(`packages/server/src/api/controllers/ai/chatIdentityLinks.ts:341-349`):

export async function listChatIdentityLinks(ctx: UserCtx) {
  const provider = ctx.query.provider as ChatIdentityLinkProvider | undefined
  const agentId = ctx.query.agentId as string | undefined
  const links = await sdk.ai.chatIdentityLinks.listChatIdentityLinks(provider)

  if (!provider || !agentId) {
    ctx.body = links   // <-- returned as-is, no workspace filter
    return
  }
  ...

SDK layer: `listChatIdentityLinks`
(`packages/server/src/sdk/workspace/ai/chatIdentityLinks.ts:304-323`) queries by
`tenantId` (optionally + `provider`) only:

export const listChatIdentityLinks = async (
  provider?: ChatIdentityLinkProvider
): Promise<ChatIdentityLink[]> => {
  const tenantId = context.getTenantId()
  const db = tenancy.getGlobalDB()
  const prefix = provider
    ? `${DocumentType.CHAT_IDENTITY_LINK}_${encodeURIComponent(tenantId)}_${provider}_`
    : `${DocumentType.CHAT_IDENTITY_LINK}_${encodeURIComponent(tenantId)}_`
  const response = await db.allDocs<ChatIdentityLink>({
    startkey: prefix, endkey: `${prefix}${UNICODE_MAX}`, include_docs: true,
  })
  return response.rows.map(row => row.doc).filter((doc): doc is ChatIdentityLink => doc != null)
}

The document id itself (`getLinkDocId`, same file, lines 44-68) is built from
`tenantId + provider + team/tenant scope + externalUserId` - it never includes a
`workspaceId`. There is no workspace boundary anywhere in this data model.

Notably, the code *does* correctly scope by workspace when both `provider` and
`agentId` are supplied (lines 356-375 - it resolves the agent's own Slack team /
Teams tenant and filters to that scope) - showing the missing check on the
"no agentId given" branch is an oversight, not an intentional design choice.

Impact

A builder with access to only one (possibly attacker-created, low-value) workspace in a
tenant can call `GET /api/chat-links` (or `GET /api/chat-links?provider=slack`) and
receive the full list of chat-identity-link records for every workspace in the
tenant, including ones they have no permission on. Each leaked record includes:

  • `globalUserId` - the internal Budibase user linked to that chat identity
  • `externalUserId` / `externalUserName` - the Slack/Teams/Discord/Telegram user
  • `teamId` / `guildId` / `providerTenantId` / `serviceUrl` - which external

This discloses which internal user is linked to which external chat identity, and which
external Slack/Teams workspace another Budibase workspace is integrated with, across a
workspace boundary the caller has no legitimate access to (CWE-639: Authorization Bypass
Through User-Controlled Key / CWE-863: Incorrect Authorization).

Proof of Concept

Attached test: `packages/server/src/api/controllers/ai/chatIdentityLinks.unit.spec.ts`.
It seeds the (mocked) sdk layer with two links belonging to two different workspaces'
Slack agents in the same tenant, then calls the real, unmodified
`listChatIdentityLinks` controller with a `ctx` representing a request that has already
passed `builderOrAdmin` scoped to Workspace A only. The response includes the link
belonging to Workspace B as well.

A standalone (dependency-free) reproduction was also run directly against a verbatim
transcription of `builderOrAdmin` + the controller + the sdk query, confirming: a builder
of Workspace A only, sending the request with `x-budibase-app-id: app_A`, is allowed
through the middleware and receives Workspace B's victim record in the response body.

Live Reproduction (v3.41.3, Docker, Burp-verified)

Reproduced end-to-end against the official `budibase/budibase:3.41.3` Docker image
(matches the source above exactly) running locally, using the real HTTP API (not just
unit tests):

  1. Ran `budibase/budibase:3.41.3` via `docker run -d -p 10000:80 -v budibase_data:/data
  2. Created a workspace ("Workspace A") as the admin
  3. Created a second, restricted user (`attacker@test.local`) via
  4. Seeded two `chatidentitylink` documents directly into CouchDB's `global-db` (bypassing
  5. `chatidentitylink_default_slack_team_A_U_ATTACKER` - "belongs" to Workspace A
  6. `chatidentitylink_default_slack_team_B_U_VICTIM` - represents a victim record from a

(The Community/self-hosted edition enforces a 1-workspace usage limit, so a second real
`Application` document could not be created to hold the second agent - the seeded
record stands in for it. This does not weaken the finding: the root cause is that nothing in the
`ChatIdentityLink` schema or query ties a record to a workspace in the first place, so
the result is identical whether or not a second `Application` document formally exists.)
5. Logged into the running instance as `attacker@test.local` through a browser proxied
through Burp Suite:

<img width="1920" height="1020" alt="1" src="https://github.com/user-attachments/assets/1f2b6f64-ca94-4039-9451-69ec6fcc3330" />

  1. Captured the login request/response in Burp - a valid session is issued for this

<img width="1920" height="1020" alt="2" src="https://github.com/user-attachments/assets/7fbf5f19-b99a-44b8-8351-4d985a2ef26a" />

  1. Replayed the exact request the builder-only UI issues, in Burp Repeater. Without

```
GET /api/chat-links HTTP/1.1
Host: localhost:10000
Cookie: budibase:auth=<attacker's session>
```

<img width="1920" height="1020" alt="3-highlighted" src="https://github.com/user-attachments/assets/aa461ff6-11fe-44ad-8eaa-7bd951624bb8" />

  1. With the header set to the attacker's own Workspace A id (i.e. exactly what the

```
GET /api/chat-links HTTP/1.1
Host: localhost:10000
x-budibase-app-id: app_dev_03ecf69edb074cf384fa1e6602d24d3a
Cookie: budibase:auth=<attacker's session>
```

the response is `200 OK` and includes both records - the attacker's own, and a
second one belonging to a completely different workspace's Slack agent:

```json
[
{
"_id": "chatidentitylink_default_slack_team_A_U_ATTACKER",
"externalUserName": "attacker-in-workspace-A",
"teamId": "team_A",
"globalUserId": "us_0dae7e34f8174d57912c41d02a2504bb", ...
},
{
"_id": "chatidentitylink_default_slack_team_B_U_VICTIM",
"externalUserName": "victim-in-workspace-B",
"teamId": "team_B",
"globalUserId": "us_9add25b77c834119a39605b245972e67", ...
}
]
```

<img width="1920" height="1020" alt="4-highlighted" src="https://github.com/user-attachments/assets/456a748c-5f0a-4b00-a3bc-674aff0df2f7" />

The second record belongs to a Slack team/workspace scope
(`team_B`/`victim-in-workspace-B`) the attacker has no builder/admin permission on
anywhere - confirmed leaked via the exact same request path a legitimate Workspace-A
builder would use, captured live in Burp.

Suggested fix

Either:
- Filter `listChatIdentityLinks` results by the requester's actual workspace-scoped
agents (the same resolution already done in the `provider && agentId` branch), even
when `provider`/`agentId` are omitted; or
- Store `workspaceId` on the `ChatIdentityLink` document and make the SDK query
workspace-scoped by default, requiring an explicit tenant-wide path reserved for global
admins only.

Affected version

Confirmed present in `budibase` master @ v3.41.3 (2026-08-15).

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
@budibase/server< 3.45.0
3.38.1
3.45.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@budibase/server
Sin parche — — 3.38.1 afectada
Versiones corregidas3.45.0
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/Budibase/budibase/security/advisories/GHSA-76m3-47v8-p7h6

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