Skip to main content

WACRM CVE-2026-77240

| EUVDEUVD-2026-83172 CRITICAL
Authorization Bypass Through User-Controlled Key (CWE-639)
2026-09-18 GitHub_M
9.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as low-privilege viewer
  2. Exploit
    PATCH profiles account_role/account_id via PostgREST
  3. Execution
    Self-promote to owner or switch tenant
  4. Impact
    Read and modify victim tenant resources

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Object-level authorization, IDOR prevention
Exploitation Conditions

Requires an authenticated account of any privilege level (a 'viewer' member is sufficient) on a self-hosted WACRM instance at version 0.7.0 or earlier; no admin rights, no user interaction, and no non-default configuration are needed since the flawed RLS policy and the authenticated GRANT on the SECURITY DEFINER RPCs ship by default. Exploitation is performed by calling the Supabase/PostgREST REST API directly (PATCH /rest/v1/profiles or POST /rest/v1/rpc/match_ai_knowledge_fts) with attacker-chosen account_role/account_id/p_account_id values. The only real limiting factors are that the attacker must first obtain a valid low-privilege JWT/account on the target instance and that the product itself is rarely deployed.

Impact

This is a genuine high-priority authorization flaw, not merely an inflated CVSS number. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H = 9.9) is well-supported by the source-code evidence: the fix PR #350 documents that any 'authenticated' PostgREST client can issue a single UPDATE on the profiles table to self-promote to 'owner' or relocate into a victim tenant, and can call SECURITY DEFINER RPCs with a foreign p_account_id to read another tenant's knowledge base. Only PR:L is required (any registered viewer), attack complexity is low, and no user interaction is needed. The scope change (S:C) is defensible because a low-privileged member crosses the tenant/security boundary to reach resources of a different security authority. Missing/soft signals temper urgency: there is NO EPSS score, NO CISA KEV listing, and NO standalone weaponized exploit in the input - although the advisory (GHSA-fg5p-2qc3-jmxr) and PR literally document the exact request payloads, which materially lowers the bar for exploitation. The dominant mitigating factor is deployment footprint: WACRM is an obscure self-hostable template, so real-world exposure is small despite the near-maximal severity. Net: treat as critical-to-patch for any operator actually running WACRM ≤0.7.0, but its aggregate internet risk is limited by rarity rather than by technical difficulty.

Exploit ScenarioDerived

An attacker registers or is invited as a low-privilege 'viewer' on a self-hosted WACRM instance, then sends a direct PostgREST PATCH to /rest/v1/profiles setting account_role='owner' (or account_id to a victim tenant's UUID), passing the RLS WITH CHECK because user_id is unchanged. With owner rights or a switched tenant they read and modify other tenants' CRM data; separately they POST to /rest/v1/rpc/match_ai_knowledge_fts with a foreign p_account_id to exfiltrate another tenant's knowledge base. No standalone exploit tool is published, but the security advisory and fix PR document the exact exploit queries.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 18, 2026

Privilege escalation and cross-tenant data disclosure in WACRM 0.7.0 and earlier allow any authenticated user - a read-only 'viewer' is sufficient - to self-promote to account owner, relocate their profile into another tenant's account, and then read or modify that tenant's resources, or to directly pull another tenant's AI knowledge-base chunks, all through the default Supabase/PostgREST REST API. The flaw is two-fold: an overly permissive row-level security policy on the profiles table that lets users edit their own account_role and account_id columns, and two SECURITY DEFINER RPCs (match_ai_knowledge_fts, match_ai_knowledge_semantic) that are GRANTed to the authenticated role and trust a caller-supplied p_account_id without any is_account_member check. Rated CVSS 3.1 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, CWE-639); exploitation requires a valid low-privilege JWT but no admin rights, no user interaction, and no non-default configuration, and no public exploit identified at time of analysis - practical risk is tempered mainly by how rarely this self-hosted template is deployed.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply commit e01f7ed37184f972ace8fb2da5c3e37e56a6050f (PR https://github.com/ArnasDon/wacrm/pull/350), which adds migrations 031_fix_profiles_update_rls.sql and 032_fix_ai_knowledge_membership.sql; consult the vendor advisory at https://github.com/ArnasDon/wacrm/security/advisories/GHSA-fg5p-2qc3-jmxr and validate in your own environment, because the migration authors explicitly note these scripts were not run against a live database. Migration 031 installs a BEFORE UPDATE trigger enforce_profile_privilege_columns that raises insufficient_privilege (SQLSTATE 42501) whenever account_role or account_id changes and current_user = 'authenticated', leaving self-service edits of full_name/avatar and the SECURITY DEFINER postgres/service_role writers (set_member_role, transfer_account_ownership, redeem_invitation) untouched; if you add a non-DEFINER RPC or a new role that must write these columns, the guard's role check must be extended or it will over-block. Migration 032 recreates match_ai_knowledge_fts and match_ai_knowledge_semantic as SECURITY INVOKER (bodies unchanged) so the existing ai_knowledge_chunks_select policy (is_account_member(account_id)) governs authenticated callers and foreign p_account_id values return zero rows; an equivalent alternative is to keep SECURITY DEFINER but add "AND (auth.role() = 'service_role' OR is_account_member(p_account_id))" to each WHERE clause. If you cannot patch immediately, compensating controls are to REVOKE EXECUTE on both match_ai_knowledge_* functions from the authenticated role (side effect: the drafts/AI knowledge retrieval path in src/lib/ai/knowledge.ts breaks for browser clients while the service_role bot is unaffected), and to block or proxy direct browser PATCH/POST traffic to /rest/v1/profiles and /rest/v1/rpc/* at the reverse proxy or network layer so tenants cannot reach PostgREST directly (side effect: any legitimate client-side Supabase access stops working). Note that changing an attacker-supplied account_id already incurred by an existing session may require re-issuing JWTs or re-validating membership rows to evict tenants that were silently moved.

Affected VersionsENISA

wacrm ≤ 0.7.0

Affected Packages

euvd wacrm no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause class is CWE-639 (authorization bypass through user-controlled key), expressed here across two layers of a Supabase (PostgreSQL + PostgREST) backend. WACRM ships its schema as SQL migrations; migration 017_account_sharing.sql defines the profiles_update row-level security policy, which only checks auth.uid() = user_id. Because RLS governs which rows may be updated, not which columns, and because no column-level GRANT or trigger guarded account_role/account_id, a normal authenticated browser client could issue PATCH /rest/v1/profiles with attacker-chosen account_role ('owner') or account_id (a victim tenant) - since user_id is unchanged the WITH CHECK passes. Those two columns are the source of truth for the is_account_member() helper used by other RLS policies, so changing them grants access to a victim tenant's data. Separately, migration 030_ai_knowledge.sql defines match_ai_knowledge_fts (lexical full-text rank) and match_ai_knowledge_semantic (vector/semantic similarity) as SECURITY DEFINER, meaning they execute with the definer's privileges and bypass RLS; they filter only on the caller-supplied p_account_id and never call is_account_member(), yet are GRANTed to the authenticated role. The migration's header assumed only the service_role auto-reply bot would invoke them, but any logged-in user can POST to /rest/v1/rpc/match_ai_knowledge_fts with a foreign p_account_id and high p_match_count to exfiltrate another tenant's knowledge-base chunks. The sanctioned writers (handle_new_user, the 018/019 member and invitation RPCs) run SECURITY DEFINER as postgres, and the server backend runs as service_role, which is what makes the fix straightforwardly discriminable.

Know when Wacrm gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 9.9 CRITICAL

Any authenticated low-privilege member (PR:L) can, with a single low-complexity API call, cross the tenant boundary (S:C) to read, modify, and delete another tenant's data (C:H/I:H/A:H).

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

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.

Technical POC Analysis

Two separate database-layer authorization defects exist in WACRM.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

WACRM 0.7.0 and earlier contains a critical privilege-escalation and cross-tenant data-access flaw that lets any authenticated user, including a read-only viewer, become an account owner and read or modify another tenant's resources and AI knowledge-base data. Because this breaks tenant isolation in the default Supabase/PostgREST configuration, affected organizations face customer-data exposure, integrity loss, and compliance risk. No public exploit identified at time of analysis, but the low-privilege requirement and lack of a vendor patch make immediate containment a leadership priority.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: revoke EXECUTE on match_ai_knowledge_fts and match_ai_knowledge_semantic from the authenticated role; add is_account_member checks and use auth.uid() instead of caller-supplied p_account_id; tighten row-level security on profiles to deny updates to account_role and account_id; remove direct UPDATE grants on those columns; restrict API access to trusted networks or disable public exposure; monitor Supabase/PostgREST logs for privilege changes and cross-tenant reads; force session revocation after policy changes.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Rare
obscure self-hostable WhatsApp CRM template, tiny hobby-project footprint
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy