Summary
EpicStaff's document download and copy endpoints can allow authenticated users with Knowledge Sources permissions to access documents belonging to other organizations. If document IDs can be enumerated and organization boundaries are not enforced, a user may download or copy foreign documents.
Affected context
The issue affects EpicStaff's DocumentViewSet download and copy endpoints in the described affected releases. It becomes a risk when those endpoints accept document identifiers without verifying that the requested document and destination collection belong to an organization the authenticated user is authorized to access.
Exploit preconditions
- Attack surface: Document download and copy endpoints
- Required access: An authenticated account with Knowledge Sources permissions in an organization
- Trigger point: A request to download or copy a document using its identifier
- Why exploitation is possible: Sequential document identifiers may be enumerable, and authorization checks may not adequately bind the requested document or destination collection to the user's organization
Why this happens
The underlying issue is inadequate object-level authorization: an endpoint uses a document identifier supplied by the caller without reliably checking access to that specific object and its organization. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where changing or guessing a key can expose or affect an object outside the caller's authorized scope.
Potential impact
- Authenticated users may access or download documents from other organizations.
- Users could copy foreign documents or insert documents into another organization's collection.
- Confidential information may be exposed, and cross-organization data separation could be weakened.
General mitigation guidance
Defensive patterns focus on enforcing authorization for every object-level operation:
- Scope document lookups and destination collections to the authenticated user's authorized organization.
- Apply consistent access checks to download, copy, and other document operations, including when identifiers are supplied directly.
- Prefer authorization-aware query patterns over fetching objects globally and relying on later checks.
- Minimize permissions and separate organizational data by default.
- Avoid treating sequential or hard-to-guess identifiers as an authorization control.
How teams detect issues like this
Review document endpoints for object lookups based on caller-supplied identifiers that are not scoped by organization or followed by explicit authorization checks. Test access-control policies with users from separate organizations, including requests for documents and destination collections outside the caller's scope. Static analysis and policy checks can flag direct object lookups or endpoint patterns that omit tenant-scoped authorization.

