Summary
TypeBot's Google Sheets OAuth callback trusts workspace, Typebot, block, and redirect identifiers supplied in a base64-encoded state value without cryptographic integrity protection or ownership checks. An authenticated user who obtains a valid Google OAuth code may cause credentials to be created in another workspace or attach them to a block in another Typebot when target identifiers are known.
Affected context
The issue occurs in TypeBot deployments using the Google Sheets OAuth integration before the patched release. Risk exists when the authenticated callback accepts client-controlled state data and does not confirm that the logged-in user has write access to the referenced workspace, Typebot, or block.
Exploit preconditions
- Attack surface: Authenticated Google Sheets OAuth callback route
- Required access: A valid TypeBot account session and the ability to obtain a valid Google OAuth authorization code
- Trigger point: Processing the callback state and creating credentials or updating Typebot groups
- Target knowledge: Workspace, Typebot, and potentially block identifiers must be known or discoverable
- Why exploitation is possible: The callback trusts unsigned state values and omits resource-level authorization checks
Why this happens
The callback treats a base64-encoded JSON state value as trusted security-sensitive data. Because base64 encoding does not provide integrity or authenticity, its embedded resource identifiers can be altered by a client. The callback then performs credential creation and Typebot updates without verifying the authenticated user's permissions on each referenced resource, mapping to CWE-862: Missing Authorization.
Potential impact
- An attacker may create Google Sheets credentials in a workspace they do not control
- An attacker could attach unauthorized credentials to a block in another Typebot
- Sensitive integration access may be exposed to unauthorized workspace members
- Typebot behavior or connected data flows could be modified
- Organizations may experience cross-tenant data exposure or workflow disruption
General mitigation guidance
Defensive design should treat OAuth state and all resource identifiers as untrusted input.
Common mitigation patterns include:
- Binding OAuth state to an authenticated session using authenticated integrity protection, such as a server-side nonce or signed state
- Rechecking workspace, Typebot, and block authorization at the callback immediately before every write operation
- Deriving target resources from server-side session state rather than trusting client-supplied identifiers
- Applying deny-by-default, resource-level permission checks for credential creation and Typebot updates
- Limiting integration credentials and application identities to the minimum required privileges
- Avoiding sensitive data in redirect parameters and validating redirect destinations against an explicit allowlist
How teams detect issues like this
Detection can focus on both code behavior and authorization policy:
- Use static analysis to identify OAuth callbacks that decode client-controlled state and directly use embedded resource identifiers
- Review code for base64 decoding being treated as authentication or integrity validation
- Flag credential creation and resource mutation paths that lack immediate object-level authorization checks
- Add policy checks requiring authorization decisions for every workspace, Typebot, and block write
- Test callbacks with valid sessions targeting resources owned by different users or workspaces
- Monitor audit logs for unusual cross-workspace credential creation or OAuth callbacks associated with unexpected resource identifiers
Automated code review and application security testing tools may help identify missing authorization boundaries.

