/

CVE-2026-48759

Severity:

HIGH RISK

(7.1)

IDOR (CWE-639) in TypeBot cross-workspace theme APIs

CVE-2026-48759

Deferred

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Cross-tenant data modification and unauthorized deletion

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

TypeBot versions 3.15.2 and below contain an Insecure Direct Object Reference (IDOR) issue in the theme template save and delete endpoints.

Any authenticated non-guest user who knows or can discover a theme template ID can modify or delete templates belonging to other workspaces, exposing or corrupting shared visual configurations across tenants.

Affected context

The vulnerability appears in TypeBot's multi-tenant environment where workspaces are used to segregate data.

The affected handlers (handleSaveThemeTemplate and handleDeleteThemeTemplate) correctly check that a user belongs to the supplied workspaceId, but the underlying Prisma queries use only themeTemplateId in the WHERE clause.

In deployments where theme template IDs can be inferred from shared bots, logs, or network traffic, this broken object-level authorization lets users reach across workspace boundaries and operate on templates they do not own.

Exploit preconditions

  • Attack surface: HTTP API endpoints responsible for saving and deleting theme templates.
  • Required access: Authenticated non-guest TypeBot account; no privileged role is required beyond membership in any workspace.
  • Trigger point: Sending requests to the theme template operations with a themeTemplateId that belongs to a different workspace than the one the user actually controls.
  • Why exploitation is possible: Authorization is enforced only at the workspace level, and the data access layer fails to scope database operations by workspaceId, so possession of a valid template ID is treated as sufficient authorization.

Why this happens

The core problem is a broken object-level authorization check consistent with CWE-639: Authorization Bypass Through User-Controlled Key.

The handlers validate that the caller is a non-guest member of some workspaceId, but the subsequent Prisma queries filter solely on the themeTemplateId field.

Because the object's workspace ownership is never cross-checked in the query (WHERE themeTemplateId = ? instead of WHERE themeTemplateId = ? AND workspaceId = ?), the system implicitly trusts user-supplied identifiers without verifying that the referenced resource belongs to the caller's tenant.

This pattern is a common multi-tenant access control flaw where object identifiers double as authorization tokens without proper scoping.

Potential impact

  • Unauthorized modification of theme templates belonging to other workspaces.
  • Deletion of theme templates used by other teams or customers, causing visual or branding disruptions.
  • Cross-tenant impact on chatbot appearance and user experience, potentially harming brand consistency.
  • Exposure of template IDs and metadata that may aid further enumeration or targeted attacks.
  • Undermining of tenant isolation guarantees in hosted or SaaS deployments.

General mitigation guidance

Effective mitigation focuses on strengthening object-level authorization and enforcing tenant scoping in all data access paths.

General defensive patterns include:

  • Ensuring every read/write/delete query on tenant-owned objects includes both the object identifier and its owning tenant/workspace identifier in the query conditions.
  • Implementing a centralized authorization layer or service that validates that the authenticated principal owns or has been granted access to the specific object referenced by an ID.
  • Treating all client-supplied identifiers (IDs, UUIDs, slugs) as untrusted and always resolving them within an authenticated user's allowed scope.
  • Using repository or ORM-level helpers that require passing a workspace/tenant context and prevent unscoped object lookups by design.
  • Applying least privilege to roles and avoiding sharing identifiers in places where they are not needed, such as unnecessary logs or over-exposed API responses.

How teams detect issues like this

Organizations can detect similar IDOR patterns using a combination of review and automation:

  • Static analysis rules that flag data-access calls where sensitive objects (e.g., templates, workspaces, flows) are fetched solely by a user-controlled ID without including tenant, owner, or workspace constraints.
  • Code review checklists requiring reviewers to verify object-level authorization for every endpoint that accepts IDs, especially in multi-tenant or workspace-based architectures.
  • Centralized logging of access control decisions, including workspace and object IDs, and alerting on suspicious cross-workspace access attempts.
  • Automated integration or API security tests that attempt to access or manipulate objects across tenant boundaries using IDs learned from one account to interact with another's resources.

Sources

SourceLink
github.comgithub.com/baptisteArno/typebot.io/releases/tag/v3.16.0
github.comgithub.com/baptisteArno/typebot.io/security/advisories/GHSA-qv4p-4mp3-pvpv

Frequently asked

questions

Any authenticated non-guest user who can learn a valid theme template ID can exploit the issue, regardless of their actual workspace, making the vulnerability cross-tenant in scope but still limited to authenticated users.

No. The flaw is in object-level authorization, so basic authenticated membership in any workspace is usually enough; the attacker does not need administrative rights over the victim workspace.

The robust fix is to tie every object-level query and mutation to both the object identifier and a verified ownership or tenant context, enforcing that the requested resource belongs to the caller's allowed scope before performing any operation.

Adopt a consistent authorization model that treats all IDs as untrusted, enforce tenant scoping at the ORM/repository layer by default, institute security-focused code reviews for all new endpoints, and complement manual review with automated tests and static analysis targeting broken object-level authorization.

Find out what's already
exploitable in your codebase.