Summary
FreeScout's polycast/receive endpoint can return notification events for other users when a guest session submits a channel name containing SQL LIKE wildcards. An attacker needs a guest session and a valid CSRF token; matching notification payloads may reveal conversation content and related metadata across users or mailboxes.
Affected context
The issue affects FreeScout's polycast/receive endpoint when supplied channel names are used to find notification events. Channel authorization is applied only to names with specific prefixes, and wildcard characters in other names are not escaped. Notification payload generation also lacks a corresponding access check, so matching events may be returned without verifying that the requester can view their contents.
Exploit preconditions
- Attack surface: The
polycast/receiveendpoint - Required access: A guest session and a valid CSRF token; the attacker does not need a normal authenticated user account
- Trigger point: Submission of a channel name that includes SQL LIKE wildcard characters
- Why exploitation is possible: Wildcards can broaden event matching beyond the authorized channel checks, and payload generation does not independently verify access to each notification
Why this happens
The endpoint uses a user-controlled channel name in a SQL LIKE match without escaping wildcard characters, allowing the supplied value to match more channels than intended. Authorization checks that apply only to names with particular prefixes do not adequately constrain those matches, and notification payloads are generated without a corresponding object-level access check. This primarily maps to CWE-639: Authorization Bypass Through User-Controlled Key and CWE-200: Exposure of Sensitive Information; the unsafe handling of SQL pattern input is also associated with CWE-89.
Potential impact
- Attackers may access notification events intended for other users.
- Conversation message content and identifiers could be disclosed across users or mailboxes.
- Notification URLs and rendered notification HTML may be exposed.
- Disclosure could reveal information useful for further targeted attacks.
General mitigation guidance
Defensive patterns focus on limiting matches to the requester's authorized scope and checking access before returning sensitive data.
- Treat channel names as data, escaping LIKE metacharacters or using exact-match queries where pattern matching is not required.
- Apply consistent authorization checks to every matched event and generated notification payload.
- Use secure-by-default query and access-control abstractions that bind records to the current user's permissions.
- Minimize sensitive content in notification payloads and apply least privilege to guest sessions.
- Validate request inputs and enforce CSRF protections as complementary controls, not substitutes for authorization.
How teams detect issues like this
- Use static analysis to identify user-controlled values in SQL LIKE expressions and verify wildcard escaping or exact-match semantics.
- Review endpoint code for authorization checks that depend on input prefixes or are absent from payload-generation paths.
- Add tests and code-review checks ensuring users cannot retrieve events belonging to other users or mailboxes, including through wildcard-like input.
- Enforce policies requiring object-level authorization before sensitive records or notification content are returned.
- Automated code review tools may help flag risky query construction and missing access checks.

