Summary
TypeBot versions before 3.17.0 expose a live Google Sheets OAuth bearer token to low-privilege guest members of a workspace. A guest who can access the vulnerable helper and enumerate credential identifiers may obtain and reuse the token outside TypeBot, potentially accessing connected Google Sheets resources.
Affected context
The issue occurs in TypeBot workspaces that use the Google Sheets integration and store OAuth credentials for that integration. The vulnerable helper authorizes requests based on workspace read access, then decrypts and refreshes the credential before returning the raw access token, allowing a guest-level workspace member to receive a credential intended for backend use.
Exploit preconditions
- Attack surface: The Google Sheets helper exposed through the TypeBot workspace application
- Required access: Low-privilege guest membership with workspace read access
- Additional condition: The guest can enumerate relevant Google credential identifiers
- Trigger point: A request to the helper that retrieves or refreshes the Google OAuth access token
- Why exploitation is possible: Authorization checks do not sufficiently distinguish guest access from privileged credential use, and the backend returns the live bearer token directly to the caller
Why this happens
The underlying flaw is an authorization and information exposure failure. A backend helper treats workspace read permission as sufficient for an operation that decrypts a stored integration credential and returns its bearer token. This exposes sensitive authentication material to a caller who should receive only the result of an authorized integration operation, not the credential itself. The issue maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Potential impact
- An attacker may access Google Sheets data available to the exposed OAuth identity
- An attacker could reuse the bearer token outside TypeBot
- Connected workspace data may be disclosed or modified, depending on token scopes
- The affected Google integration account could be abused until the token expires or is revoked
- Additional workspace or third-party resources may be exposed if they share the same authorization context
General mitigation guidance
Mitigation generally focuses on enforcing operation-specific authorization and preventing credential material from crossing the application trust boundary.
Common defensive patterns include:
- Never return raw OAuth access or refresh tokens to guest or client-side callers
- Perform Google Sheets actions through a controlled server-side integration layer
- Require explicit privilege checks for credential discovery, decryption, refresh, and use
- Apply least-privilege OAuth scopes and isolate credentials by workspace and integration
- Minimize credential identifiers exposed to users and prevent unauthorized enumeration
- Revoke or rotate potentially exposed tokens and review connected-account activity
- Treat bearer tokens as secrets in logs, responses, telemetry, and error messages
How teams detect issues like this
Organizations can look for:
- Static analysis rules identifying helper functions that return OAuth tokens or credential contents
- Code review signals where read-only workspace checks guard credential decryption or token refresh
- API inventory reviews that identify client-accessible endpoints capable of returning secrets
- Authorization tests covering guest, member, administrator, and unauthenticated roles
- Monitoring for unusual Google API use, token requests, credential enumeration, and access from outside expected TypeBot infrastructure
- Policy enforcement preventing secrets from appearing in serialized API responses, logs, or browser-visible data
Automated security scanning and authorization-focused integration tests can help detect similar exposure paths during development.

