Summary
FreeScout's conversation_change_customer backend action allows a low-privileged agent to rebind a conversation to any customer email, bypassing mailbox scoping enforced by the UI search endpoint.
When misused, this lets an agent associate a conversation in their mailbox with a hidden customer belonging to another mailbox, breaking tenant and mailbox isolation.
Affected context
This vulnerability affects FreeScout installations where:
- Multiple mailboxes or teams share a single FreeScout instance.
- Customer visibility is scoped per mailbox, and some customers are intentionally hidden from certain agents.
- Agents can access the Change Customer modal and trigger the conversation_change_customer action.
The issue manifests when the backend does not enforce the same mailbox and ownership checks as the UI-filtered search, allowing arbitrary customer_email values to be bound to a conversation.
Exploit preconditions
- Attack surface: FreeScout web application, specifically the endpoint handling conversation_change_customer.
- Required access: Authenticated low-privileged agent with access to at least one mailbox and the Change Customer functionality.
- Trigger point: Submission of a crafted request that sets customer_email to a customer belonging to another mailbox or scope.
- Why exploitation is possible: The backend authorization logic trusts the supplied customer_email and only applies mailbox-scoped filtering in the UI search endpoint, not in the server-side update handler, enabling an Insecure Direct Object Reference (IDOR) condition.
Why this happens
The core issue is a mismatch between front-end visibility rules and back-end authorization checks.
While the Change Customer modal uses a mailbox-filtered search endpoint to hide out-of-scope customers, the conversation_change_customer action on the server accepts any customer_email without verifying that the acting agent is authorized to reference that customer within the current mailbox.
This aligns with CWE-639: Authorization Bypass Through User-Controlled Key, where a user-controllable identifier (customer_email) is not validated against the user's access rights, leading to unauthorized binding of objects across logical boundaries.
Potential impact
- Conversations in one mailbox may be bound to customers belonging to another mailbox.
- Agents could gain indirect visibility into customer relationships or identifiers that should be hidden from them.
- Breakdown of mailbox or tenant isolation, potentially leading to misrouted replies or confusion in customer communication history.
- Increased risk of further logic abuse or social engineering due to incorrect associations between conversations and customers.
General mitigation guidance
Effective mitigation focuses on enforcing consistent authorization on the server side for any operation that references customer identifiers:
- Validate that the acting user is authorized to associate a conversation with the supplied customer_email based on mailbox, team, or tenant constraints.
- Treat user-controlled identifiers (such as emails, IDs, or hashes) as untrusted and re-resolve them within the current authorization context before performing updates.
- Align backend access control with front-end filtering: any object hidden in the UI should also be rejected by the corresponding backend action.
- Centralize authorization checks for customer–conversation relationships to avoid drift between endpoints and to ensure secure-by-default behavior across new features.
- Apply least-privilege principles so that low-privileged agents can only bind conversations to customers within their assigned mailboxes or scopes.
How teams detect issues like this
Organizations can detect and monitor this class of issue using a mix of preventive and detective controls:
- Static analysis & code review: Flag endpoints that accept user-supplied object references (e.g., customer_email, customer_id) and ensure they consistently enforce mailbox/tenant checks, not just input validation.
- Authorization policy reviews: Examine all conversation update and customer association code paths to confirm that authorization logic is centralized and applied uniformly.
- Logging and anomaly detection: Log conversation_change_customer actions, including actor identity, mailbox, and target customer; alert on cross-mailbox bindings or unexpected mailbox–customer combinations.
- Automated testing: Add regression tests that attempt to associate conversations with customers from other mailboxes to verify that such requests are rejected.
- Security tooling: Use application security testing tools or custom scripts to probe for IDOR conditions by manipulating identifiers in authenticated requests.

