Summary
Budibase's chat handoff endpoint allows attackers to bind their external chat identity (Slack, Discord, MS Teams) to a victim's authenticated Budibase account without any authentication or consent.
When a logged-in user is tricked into visiting a crafted URL, their account is silently and permanently linked to the attacker's external identity, enabling account misuse and impersonation in integrated chat systems.
Affected context
This vulnerability occurs in Budibase deployments where external chat integrations are enabled and the /api/chat-links/:instance/:token/handoff endpoint is reachable as a public route.
It becomes risky when authenticated Budibase users can be induced to click or load attacker-controlled URLs, and when chat identity handoff is treated as a server-side, state-changing operation without explicit user confirmation or additional checks.
Exploit preconditions
- Attack surface: Public HTTP endpoint at
GET /api/chat-links/:instance/:token/handoff - Required access: Ability to generate a valid chat handoff token via an external chat slash command and to deliver the corresponding URL to a logged-in Budibase user (e.g., via email, chat, or embedded link)
- Trigger point: Victim's browser performs a GET request to the handoff URL while the victim is authenticated to Budibase
- Why exploitation is possible: The endpoint is unauthenticated, performs a permanent state change, embeds attacker-controlled externalUserId in the token, and lacks CSRF protection or a consent UI, so the server trusts the request and binds identities without verifying ownership
Why this happens
The underlying issue is a combination of broken authorization (CWE-284) and missing cross-site request forgery protections (CWE-352) on a state-changing endpoint.
The chat handoff route is exposed as a public GET endpoint that alters account linkage, yet it does not require the caller to prove that they own the external identity being bound or that the request originated from the victim's intentional action.
Architecturally, identity binding logic is triggered solely by the presence of a token parameter, with no secondary confirmation, CSRF token, or server-side check that the external identity belongs to the authenticated user.
Potential impact
- Attacker may permanently link their Slack/Discord/MS Teams identity to a victim's Budibase account
- Attacker could impersonate the victim in integrated chat contexts or receive messages intended for the victim
- Victim's account behavior in chat-based workflows may be altered or misattributed
- Organization's audit trails and identity mappings can become unreliable or misleading
General mitigation guidance
Effective mitigation centers on tightening authorization for identity-linking endpoints and introducing explicit user consent for account binding operations.
Common defensive patterns include:
- Requiring authenticated access and ownership verification for any external identity handoff or account-linking route
- Treating identity binding as a high-sensitivity operation that demands an explicit confirmation step or UI, rather than a simple GET request
- Enforcing CSRF protections on state-changing routes, including tokens bound to the user's session and verified on the server
- Designing integration flows so that external identities are confirmed through callbacks or OAuth-style exchanges, rather than attacker-controlled tokens
- Applying least privilege by limiting which components can initiate identity changes and auditing all account-linking events
How teams detect issues like this
Detection typically focuses on identifying insecure state-changing endpoints and anomalous identity-linking activity.
Useful strategies include:
- Static analysis or API linting to flag public endpoints that modify user state, especially GET routes without authorization or CSRF checks
- Code review checklists that highlight account-linking and identity-binding logic as high-risk areas requiring explicit ownership verification
- Logging and monitoring of identity linkage events, looking for repeated bindings between unrelated accounts or unusual token sources
- Policy-based API gateways or application firewalls that enforce authentication and method constraints (e.g., disallowing state changes over unauthenticated GET)
- Automated security testing that attempts CSRF-style requests against sensitive account operations to verify protections

