Summary
WACRM's automation engine contains an authorization bypass that lets authenticated users operate on contacts outside their own tenant by manipulating a caller-controlled contact_id field.
When row-level ownership checks are skipped for service-role clients, an attacker who knows a victim contact UUID can read or modify cross-tenant contact details such as name, email, and company.
Affected context
The vulnerability appears in the WACRM automation engine when handling POST requests that include a contact_id in the request body.
It manifests in environments where:
- Multi-tenant data is stored in a shared database with row-level security expectations
- A service-role client can bypass row-level security controls
- Tenant ownership is not explicitly verified before performing contact operations
In such setups, any authenticated user of the automation engine who can invoke the vulnerable endpoint and supply arbitrary contact UUIDs may be able to cross tenant boundaries.
Exploit preconditions
- Attack surface: WACRM automation engine HTTP endpoint(s) that accept POST requests with a contact_id parameter.
- Required access: Valid authenticated access to the automation engine through a service-role or similar client that bypasses standard row-level security.
- Trigger point: Submission of a crafted POST request where the contact_id is set to a UUID belonging to another tenant's contact.
- Why exploitation is possible: The backend logic relies on a caller-controlled identifier to select contact records, but omits tenant ownership or row-level authorization checks before performing updates; the service-role client runs with elevated privileges that ignore standard tenant scoping.
Why this happens
This issue stems from treating a caller-supplied identifier as trustworthy without enforcing tenant-level authorization on the corresponding resource.
The automation engine accepts a contact_id in the request body and uses it directly to locate and modify contact records in a shared multi-tenant datastore, relying on a service-role that bypasses row-level security.
Because no additional check ensures that the contact belongs to the caller's tenant, any valid contact UUID effectively becomes a direct object reference that crosses isolation boundaries.
This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where authorization relies solely on user-controlled keys or identifiers instead of independent access control logic.
Potential impact
- Attackers may update victim contacts' names, email addresses, and company fields across tenant boundaries.
- Attacker-controlled modifications could disrupt CRM workflows, automation rules, and business processes.
- Unauthorized changes may lead to misdirected communications, phishing opportunities, or reputational damage.
- Cross-tenant data isolation assumptions can be broken, eroding compliance and confidentiality guarantees.
General mitigation guidance
Effective mitigation focuses on enforcing strict tenant-aware authorization independently of client-supplied identifiers and elevated service roles.
Common defensive patterns include:
- Verifying tenant ownership on every contact operation by deriving tenant context from the authenticated principal, not from request payload fields.
- Enforcing row-level access control in the business logic even when using service roles or bypass channels, ensuring that elevated roles still respect tenant boundaries unless explicitly justified.
- Treating identifiers from the request body (such as contact_id) as untrusted selectors and validating them against the caller's allowed resource set before performing any read or write.
- Centralizing authorization checks in reusable policies or middleware so that all automation engine endpoints consistently apply tenant scoping rules.
- Applying the principle of least privilege to service-role clients, limiting their ability to operate across tenants unless absolutely necessary and guarded by explicit checks.
How teams detect issues like this
Organizations can identify and monitor this pattern by:
- Performing code reviews that look for resource access based solely on caller-controlled IDs (e.g., contact_id) without accompanying tenant or ownership checks.
- Using static analysis or custom linters to flag data-access functions invoked with raw request parameters and no visible authorization layer or tenant filter.
- Reviewing ORM and query-building code for uses of service or admin roles that disable row-level security without adding compensating tenant constraints.
- Enforcing architectural policies that require explicit multi-tenant scoping (e.g., where tenant_id must be derived from the authenticated context and joined in queries) and incorporating these into CI checks or automated security review tools.

