Summary
FreeScout versions prior to 1.8.212 contain an authorization flaw where the limit_user_customer_visibility restriction is not enforced during customer merge operations.
Under certain configurations, this can allow a user to merge and thereby gain access to customer records they should not be able to see, violating data segregation and confidentiality boundaries.
Affected context
This issue affects FreeScout deployments that:
- Use the customer merge feature in the help desk/shared inbox workflow
- Rely on
limit_user_customer_visibilityor similar settings to restrict which customers a user can view or manage - Allow non-admin or scoped users to initiate or influence customer merge actions
In these environments, the visibility limitation is not consistently applied when customers are merged, weakening tenant or account-based isolation.
Exploit preconditions
- Attack surface: Application web interface (customer management / merge functionality)
- Required access: Authenticated user account with permission to merge or interact with customers, but with restricted visibility configured via
limit_user_customer_visibility - Trigger point: Initiating or manipulating a customer merge flow that involves customers outside the user's allowed visibility scope
- Why exploitation is possible: The application fails to re-check or enforce the
limit_user_customer_visibilityconstraint when processing the merge, resulting in an insecure direct object reference (CWE-639) that bypasses access control for certain customer records.
Why this happens
The root cause is an inconsistent authorization check tied to object-level access control.
While the application provides a limit_user_customer_visibility setting to restrict which customer entities a user can access, this constraint is not incorporated into the logic that handles customer merges.
As a result, the merge operation assumes that the caller is authorized for both source and target customers without verifying that both objects fall within the user's permitted visibility.
This pattern aligns with CWE-639: Authorization Bypass Through User-Controlled Key, where an operation on internal objects (customers) is permitted based on identifiers or workflow paths controlled by a user, without enforcing the appropriate permission checks at the time of the operation.
Potential impact
- Users may gain unauthorized read access to merged customer records they should not be able to view.
- Users may gain indirect access to conversation histories, tickets, or metadata associated with restricted customers.
- Cross-account or cross-team data leakage can occur in multi-tenant or segmented deployments.
- Regulatory or contractual confidentiality obligations may be violated due to exposure of sensitive customer information.
General mitigation guidance
Effective mitigation centers on enforcing consistent object-level authorization checks for all operations involving customer records:
- Apply the same
limit_user_customer_visibility(or equivalent) authorization logic to every path that reads, writes, merges, or reassigns customers. - Centralize authorization decisions in reusable helpers or policies so that business features (like merge) must invoke them rather than duplicating checks.
- Treat customer identifiers and merge targets as untrusted input, ensuring the backend verifies that the acting user is allowed to reference both source and destination customers.
- Design the application so that sensitive operations, such as merges that may affect visibility boundaries, are restricted to roles with broader, intentionally granted scopes.
- Favor "deny by default" behavior when visibility rules are ambiguous, failing safely rather than proceeding with a merge on partially authorized data.
How teams detect issues like this
Detection efforts can focus on both code-level and behavior-level indicators:
- Static analysis and code review:
- Look for controller or service methods that perform customer merges and confirm they invoke the same authorization policies used for individual customer access.
- Flag any usage of customer IDs or merge targets where authorization is assumed rather than explicitly checked.
- Review conditional logic around
limit_user_customer_visibilityor similar settings to ensure it is enforced in all relevant workflows. - Policy and test-based checks:
- Implement automated tests that simulate restricted users attempting to merge or reference out-of-scope customers and assert denial.
- Use security-focused integration tests or QA scripts to cover multi-tenant and limited-visibility scenarios.
- Operational monitoring:
- Monitor logs for unusual patterns of customer merges, especially where users with limited scopes perform merges involving multiple teams or tenants.
- Configure alerts for unexpected spikes in merge activity tied to scoped user roles.

