Summary
A broken authorization check in Outline's subscriptions.create API allows users to create subscriptions to documents they are not authorized to read.
By sending both collectionId and documentId in a single request, the handler validates access only against the collection while the underlying command stores a subscription tied to the document, enabling stealthy monitoring of restricted documents across any team in the instance.
Affected context
This vulnerability affects Outline deployments using versions 0.84.0 through 1.7.0 where:
- The
subscriptions.createAPI endpoint is exposed to authenticated users. - Users can control both
collectionIdanddocumentIdparameters in the request body. - The system relies on route-level authorization checks without enforcing mutual exclusivity between collection-level and document-level identifiers.
Under these conditions, a user can attach their account to notifications or updates for documents they cannot otherwise read, across teams hosted on the same instance.
Exploit preconditions
- Attack surface: HTTP API endpoint
subscriptions.create(server/routes/api/subscriptions/subscriptions.ts). - Required access: Authenticated user account on the Outline instance; ability to submit API requests to the subscription creation route.
- Trigger point: A request that includes both a valid
collectionId(the attacker can access) and a targetdocumentId(which the attacker cannot read). - Why exploitation is possible: The route handler authorizes only the collection branch when both parameters are present, but the downstream
subscriptionCreatorlogic persists the subscription using the unvalidateddocumentId. The schema allows both fields simultaneously and does not assert mutual exclusivity, so the inconsistent authorization and persistence paths are never reconciled.
Why this happens
The underlying issue is a broken access control pattern where authorization is performed on one resource while operations are applied to another, closely aligning with CWE-639: Authorization Bypass Through User-Controlled Key.
The route handler contains a conditional (if (collectionId)) that:
- Treats the request as a collection subscription scenario when
collectionIdexists. - Performs authorization checks only on the collection resource.
However, the command responsible for creating the subscription (subscriptionCreator in server/commands/subscriptionCreator.ts) writes the record against documentId if it is present, regardless of whether document-level authorization was ever performed.
Because the request schema only enforces "at least one of collectionId or documentId" and does not require them to be mutually exclusive, it permits a crafted request with both fields set. This mismatch between validation, authorization, and persistence leads to a classic ID-based authorization flaw, where a user-controlled identifier bypasses intended document-level access controls.
Potential impact
- An attacker could subscribe to updates on documents they cannot read directly.
- Sensitive document titles, metadata, or activity events might be inferred via notification channels.
- Users could maintain long-lived visibility into changes affecting confidential or private documents across teams.
- Audit trails and alerting may show only "legitimate" subscription creation, making the abuse blend into normal activity.
General mitigation guidance
Effective mitigation focuses on aligning validation, authorization, and persistence around the same resource identifiers:
- Enforce mutual exclusivity between
collectionIdanddocumentIdat the schema level when only one type of subscription is intended per request. - Ensure that authorization logic explicitly validates the exact resource that will be written to or referenced (e.g., always check access to
documentIdbefore creating a document subscription). - Centralize authorization checks in reusable helpers or middleware so that route handlers and command layers cannot diverge in their assumptions.
- Adopt a secure-by-default design where ambiguous or mixed identifiers cause the request to fail rather than allowing best-effort handling.
- Apply the principle of least privilege so that subscription endpoints cannot be used to infer more than a user's existing read access permits, even if misconfigured.
How teams detect issues like this
Organizations can look for this category of issue through:
- Static analysis and code scanning:
- Rules that flag patterns where authorization is performed on one identifier (e.g.,
collectionId) while database writes or queries use a different identifier (e.g.,documentId). - Detection of routes where multiple resource IDs are accepted but only a subset are included in access-control checks.
- Code review practices:
- Require reviewers to verify that each user-controlled ID used in a query or write has a corresponding, explicit authorization check.
- Pay attention to schema refinements (
.refine()or equivalents) that enforce "at least one of" but not mutual exclusivity, especially when downstream logic has branching behavior. - Runtime monitoring and logging:
- Log subscription creation events with both the acting user and the target resource, then periodically scan for subscriptions where the user lacks read access to the associated document.
- Implement policy checks or background jobs that detect and flag inconsistent subscriptions and similar authorization anomalies.

