Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-42142

CVE-2026-42142: TypeBot Auth Bypass Vulnerability

CVE-2026-42142 is an authentication bypass vulnerability in TypeBot that allows unauthorized access to Google Sheets OAuth credentials across workspaces. This article covers the technical details, affected versions, and mitigation.

Updated:

CVE-2026-42142 Overview

CVE-2026-42142 is a missing authorization vulnerability [CWE-862] in TypeBot, an open-source chatbot builder. The handleGetSheets API handler at POST /api/sheets/getSheets fails to validate workspace membership before returning data. Any authenticated user can query the endpoint using another workspace's credentialsId and receive decrypted Google Sheets OAuth credentials, along with spreadsheet metadata such as sheet names, IDs, and column headers. The flaw affects all TypeBot versions prior to 3.17.0. Cross-tenant exposure of OAuth tokens allows attackers to pivot into victims' Google Sheets data outside the TypeBot application itself.

Critical Impact

Any authenticated TypeBot user can retrieve decrypted Google Sheets OAuth credentials belonging to other workspaces, enabling unauthorized access to third-party Google spreadsheet data.

Affected Products

  • TypeBot (baptisteArno/typebot.io) versions prior to 3.17.0
  • TypeBot self-hosted deployments using the Google Sheets integration
  • TypeBot workspaces with stored Google OAuth credentials

Discovery Timeline

  • 2026-08-11 - CVE-2026-42142 published to the National Vulnerability Database (NVD)
  • 2026-08-11 - Last updated in NVD database
  • v3.17.0 - Fix released via TypeBot GitHub Release v3.17.0

Technical Details for CVE-2026-42142

Vulnerability Analysis

The vulnerability resides in apps/builder/src/features/blocks/integrations/googleSheets/api/handleGetSheets.ts. The handler accepts a credentialsId from the client and directly loads the corresponding Google Sheets credential record. It then calls getGoogleSpreadsheet to decrypt the OAuth token and enumerate spreadsheet content. The handler never verifies that the calling user belongs to the workspace that owns the credential.

Because TypeBot stores Google OAuth refresh tokens per workspace, exposing these to unrelated tenants effectively grants read access to any Google spreadsheet the token can reach. The impact extends beyond TypeBot into the connected Google account.

Root Cause

The root cause is a missing authorization check [CWE-862]. The endpoint trusted the client-supplied credentialsId as sufficient authorization. It did not join the credential lookup with the user's workspace membership, nor did it invoke a helper such as isReadWorkspaceFobidden before decrypting sensitive material.

Attack Vector

An authenticated attacker sends a POST /api/sheets/getSheets request containing a credentialsId value belonging to any other workspace. The server returns the associated Google Sheets metadata and, through the decrypted OAuth token, enables further queries against the victim's spreadsheets. Enumeration of credentialsId values or leakage through shared logs makes discovery straightforward.

typescript
// Security patch: apps/builder/src/features/blocks/integrations/googleSheets/api/handleGetSheets.ts
 import { ORPCError } from "@orpc/server";
 import { getGoogleSpreadsheet } from "@typebot.io/credentials/getGoogleSpreadsheet";
 import { isDefined } from "@typebot.io/lib/utils";
+import prisma from "@typebot.io/prisma";
+import type { User } from "@typebot.io/user/schemas";
 import { z } from "zod";
+import { isReadWorkspaceFobidden } from "@/features/workspace/helpers/isReadWorkspaceFobidden";

 export const getSheetsInputSchema = z.object({
   credentialsId: z.string(),

Source: GitHub Commit 91d2a98. The patch imports prisma and the isReadWorkspaceFobidden helper so the handler can look up the credential's workspace and reject requests from non-members before decryption occurs.

Detection Methods for CVE-2026-42142

Indicators of Compromise

  • Requests to POST /api/sheets/getSheets where the authenticated user's workspace does not own the referenced credentialsId
  • High-volume enumeration of distinct credentialsId values from a single account or IP
  • Unexpected Google Sheets API activity originating from workspace OAuth tokens shortly after suspicious TypeBot API calls

Detection Strategies

  • Correlate application logs of /api/sheets/getSheets with the workspaceId associated to the caller and flag mismatches with the credential owner
  • Review database access patterns for Credentials table reads that are not preceded by a workspace membership query
  • Alert on any TypeBot instance still running a version below 3.17.0 via software inventory or SBOM checks

Monitoring Recommendations

  • Enable request logging with authenticated user ID, credentialsId, and response status for all /api/sheets/* routes
  • Monitor Google Workspace audit logs for anomalous spreadsheet reads tied to TypeBot service accounts
  • Track sudden growth in error rates or 200-OK responses for getSheets calls that historically saw low volume

How to Mitigate CVE-2026-42142

Immediate Actions Required

  • Upgrade TypeBot to version 3.17.0 or later on all self-hosted and managed deployments
  • Rotate all Google Sheets OAuth credentials stored in TypeBot workspaces, as prior tokens must be considered exposed
  • Audit workspace membership and remove stale or unknown user accounts before rotation

Patch Information

The fix is included in TypeBot v3.17.0 via Pull Request #2467 and commit 91d2a98. See the GitHub Security Advisory GHSA-7jr4-r73c-h4h9 for full details. The patch enforces workspace membership through the isReadWorkspaceFobidden helper before returning any sheet data.

Workarounds

  • Restrict network access to the TypeBot builder API so only trusted internal users can reach /api/sheets/getSheets
  • Temporarily disable the Google Sheets integration and revoke stored OAuth tokens until the upgrade is deployed
  • Apply a reverse-proxy rule that blocks POST /api/sheets/getSheets for all users pending patch rollout
bash
# Example nginx block to disable the vulnerable endpoint until upgrade
location = /api/sheets/getSheets {
    return 403;
}

# Verify the running TypeBot version after upgrade
docker inspect --format '{{ .Config.Image }}' typebot-builder
# Expected image tag: baptistearno/typebot-builder:3.17.0 or later

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.