Summary
The Outline collaborative documentation platform contains an insecure direct object reference (IDOR) in the shares.create API endpoint.
When both collectionId and documentId are supplied, authorization is only enforced on the collection, allowing authenticated users to generate public share links for arbitrary documents, including those in other workspaces, and then retrieve their full contents via documents.info.
Affected context
This vulnerability appears in Outline deployments where the shares.create endpoint is exposed to authenticated users and is implemented to accept both collectionId and documentId parameters.
The bug manifests when the server validates access to the collection but does not separately verify that the requesting user is authorized to access the specific document referenced.
In multi-tenant or multi-workspace environments, this gap allows an authenticated user in one workspace to create share links for documents hosted in other workspaces, provided they can guess or obtain relevant identifiers.
Exploit preconditions
- Attack surface: Outline HTTP API, specifically the
shares.createendpoint, and subsequent use ofdocuments.info. - Required access: Authenticated account on the Outline instance (no special privileges required beyond access to the API).
- Knowledge requirements: Ability to obtain or guess valid
documentIdandcollectionIdvalues for target documents (e.g., via enumeration, leaked IDs, or predictable identifiers). - Trigger point: Sending a crafted
shares.createrequest that includes bothcollectionIdanddocumentIdwhere the user has access to the collection (or where the collection check is incorrectly satisfied), but not to the specific document. - Why exploitation is possible: The authorization logic only verifies permissions at the collection level and ignores the document-level authorization, creating an insecure direct object reference to the document resource tied to the share link.
Why this happens
The root cause is a broken authorization check characteristic of CWE-639: Insecure Direct Object Reference.
The shares.create endpoint uses client-supplied identifiers (collectionId and documentId) to operate on server-side resources but only validates that the user can access the referenced collection.
It fails to perform an independent, explicit authorization check on the targeted document before generating a share link.
This conflation of collection-level and document-level permissions allows attackers to reference documents they do not own and still receive valid public URLs, which downstream endpoints like documents.info honor without verifying the initiating user's original access rights.
Potential impact
- Unauthorized reading of private or confidential documents.
- Cross-workspace or cross-tenant data exposure in multi-tenant Outline deployments.
- Leakage of sensitive business information, intellectual property, or regulated data.
- Facilitation of further social engineering or phishing attacks using exposed internal documentation.
- Potential compliance violations where document confidentiality is mandated (e.g., under contractual or regulatory requirements).
General mitigation guidance
Effective mitigation focuses on enforcing resource-level authorization and embracing defense-in-depth for access control:
- Implement explicit, per-resource permission checks for documents in every endpoint that accepts
documentId, regardless of collection checks that may also be present. - Centralize authorization logic in shared helpers or middleware to avoid inconsistent checks across endpoints that operate on documents and shares.
- Treat client-supplied identifiers as untrusted; confirm both existence and access rights for each referenced resource (document, collection, workspace) independently.
- Ensure share creation routines verify that the initiating user has at least read access to the specific document being shared, not just its parent collection.
- Apply least-privilege design so that public or semi-public sharing is disabled or restricted by default, with explicit opt-in and administrative controls.
- Conduct regular authorization modeling exercises to document which actors may access which resources, and verify that implementation aligns with this model.
How teams detect issues like this
Organizations can detect and monitor for similar vulnerabilities using a combination of testing and review techniques:
- Static analysis and code review:
- Flag API handlers that accept raw resource IDs (
documentId,collectionId,workspaceId) and verify that each resource has a corresponding authorization check. - Look for endpoints where authorization is only applied at a parent or container level (e.g., collection) while child resources (e.g., documents) are accessed directly.
- Enforce patterns such as "no data fetch by ID without a prior permission check" using code review checklists or custom linters.
- Dynamic and security testing:
- Use API security testing tools or manual testing to attempt creating share links for documents that test users should not be able to access.
- Add regression tests to validate that users from one workspace cannot share or read documents belonging to another.
- Logging and monitoring:
- Log share creation events with user identity, workspace, collection, and document identifiers.
- Monitor for anomalies such as users creating share links for documents they have no recorded interaction with or from other workspaces.
- Automated policy enforcement:
- Integrate automated checks in CI/CD that reject changes introducing new share or document endpoints without standardized authorization wrappers.

