rootpwn

critical · CVSS v3 9.9

CVE-2026-77240

WACRM, a self-hosted WhatsApp CRM template, has a critical flaw in its Supabase migrations that lets authenticated users alter their account

Overview

WACRM, a self-hosted WhatsApp CRM template, has a critical flaw in its Supabase migrations that lets authenticated users alter their account role and tenant association, enabling privilege escalation and cross-tenant data access. The vulnerability also allows non-members to read another tenant’s knowledge-base chunks via SECURITY DEFINER functions. It was fixed in commit e01f7ed37184f972ace8fb2da5c3e37e56a6050f.

Description

WACRM is a self-hostable CRM template for WhatsApp. In version 0.7.0 and earlier, the profiles_update row-level security policy in supabase/migrations/017_account_sharing.sql permits authenticated users to modify their own account_role and account_id, allowing a viewer to self-promote or move into another tenant and then access or modify tenant resources. Separately, match_ai_knowledge_fts and match_ai_knowledge_semantic in supabase/migrations/030_ai_knowledge.sql run as SECURITY DEFINER, accept a caller-controlled p_account_id, and omit an is_account_member check, allowing an authenticated non-member to read another tenant's knowledge-base chunks. This vulnerability is fixed with commit e01f7ed37184f972ace8fb2da5c3e37e56a6050f.

Impact

Confidentiality and integrity are compromised as attackers can elevate privileges to access or modify resources belonging to other tenants. This enables unauthorized data disclosure and potential tampering of tenant data. Defenders should monitor for anomalous role changes and cross-tenant access patterns.

Remediation

Apply the latest WACRM release (>=0.8.0) or manually apply the commit e01f7ed37184f972ace8fb2da5c3e37e56a6050f to the database. Ensure row‑level security policies enforce tenant checks and remove SECURITY DEFINER functions that accept caller‑controlled parameters. Revoke unnecessary privileges, audit role assignments, and enforce least‑privilege access controls.

Risk context

The vulnerability is rated critical with a CVSS v3 score of 9.9, indicating a high likelihood of exploitation and severe impact. Immediate patching is recommended to mitigate potential privilege escalation and data leakage.

Affected products

  • WACRM

Scores

Severity
critical
CVSS v2
9
CVSS v3
9.9
CVSS v4
EPSS

privilege-escalation row-level-security supabase whatsapp-crm data-leak critical tenant-isolation

← All CVEs