/

CVE-2026-136179

Severity:

HIGH RISK

(7.1)

IDOR (CWE-639) in EpicStaff DocumentViewSet Endpoints

CVE-2026-136179

Received

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Cross-organization document access and unauthorized document copying

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/EpicStaff/EpicStaff/blob/v1.3.0/src/django_app/tables/services/knowledge_services/document_management_service.py#L470-L505
github.comgithub.com/EpicStaff/EpicStaff/blob/v1.3.0/src/django_app/tables/views/knowledge_views/document_management_views.py#L271-L305
github.comgithub.com/EpicStaff/EpicStaff/commit/7bddaf8cf689487eb80860894941b7713afab871
github.comgithub.com/EpicStaff/EpicStaff/releases/tag/v1.3.1
github.comgithub.com/EpicStaff/EpicStaff/security/advisories/GHSA-8j32-5vj5-pqvr
vulncheck.comvulncheck.com/advisories/epicstaff-1.2.0-before-1.3.1-idor-via-document-download-and-copy-endpoints

Frequently asked

questions

The described attack requires an authenticated user with Knowledge Sources permissions in an organization; unauthenticated access is not indicated.

The user needs access to the relevant endpoints. The issue arises if document identifiers can be enumerated and the endpoints do not enforce organization-level authorization.

Authorize each document and destination collection against the authenticated user's organization, and scope object lookups to that authorized organization.

Apply and test object-level authorization consistently across endpoints, use tenant-scoped data access patterns, and treat object identifiers as references rather than proof of permission.

Find out what's already
exploitable in your codebase.