mediumCVSS 5.7Vulnerability

GHSA-gh4h-34gr-87r7

## Summary When an SSO-authenticated user tests an automation in the Budibase builder, their OAuth2 access token and refresh token are included in the automation test results. These results are broadcast via WebSocket to all builders connected to the same dev app and stored in an in-memory cache accessible to any builder who polls the test status endpoint. This allows any co-builder of the same app to steal the testing user's OAuth2 tokens. ## Details The vulnerability exists because `getUserContextBindings()` intentionally includes OAuth2 tokens in user context bindings (so automations can call external APIs), but the automation test pipeline exposes the full result — including these tokens — to all builders of the same app without sanitization. **Step 1: Tokens included in user bindings** In `packages/server/src/sdk/users/utils.ts:134-161`: ```typescript export function getUserContextBindings(user: ContextUser): UserBindings { const bindings: UserBindings = { _id: user._id, email: user.email, // ... } if (isSSOUser(user) && user.oauth2) { bindings.oauth2 = { accessToken: user.oauth2.accessToken, // <-- sensitive refreshToken: user.oauth2.refreshToken, // <-- sensitive } } return bindings } ``` **Step 2: Bindings passed to automation execution** In `packages/server/src/api/controllers/automation.ts:311-312`: ```typescript const user = sdk.users.getUserContextBindings(ctx.user) return await triggers.externalTrigger( { ...automation, disabled: false }, { ...input, appId, user }, // user with tokens passed as event param { getResponses: true, onProgress: emitProgress } ) ``` **Step 3: Tokens placed in trigger outputs** In `packages/server/src/threads/automation.ts:409-413`: ```typescript const trigger: AutomationTriggerResult = { id: data.automation.definition.trigger.id, stepId: data.automation.definition.trigger.stepId, inputs: null, outputs: data.event, // data.event includes user.oauth2 tokens }

Properties

ghsa_id
GHSA-gh4h-34gr-87r7
severity
medium
summary
Budibase: OAuth2 Token Disclosure via Automation Test Results Broadcast to Other Builders
cvss_score
5.7
cve_id
GHSA-gh4h-34gr-87r7
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-07-24T21:25:20Z
source_url
https://github.com/advisories/GHSA-gh4h-34gr-87r7
ghsa_updated
2026-07-24T21:25:22Z

Related Entities (4)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]npm/@budibase/server

AFFECTS (1)

[Software]npm/@budibase/server

HAS_WEAKNESS (1)

[Weakness]Exposure of Sensitive Information to an Unauthorized Actor

Explore deeper with Ninja Signal's threat intelligence graph