Attachment Import Preset Authorization Bypass
Summary
Summary
POST /api/attachments.create lets any authenticated team member (regardless of role — member, viewer, etc.) create an attachment with preset: "import" or preset: "workspaceImport". Unlike every other code path in the file that accepts a documentId, this branch never calls `au...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| otherOutline |
< 1.10.1→ 1.10.1 |
1.10.1 |
Original description The description as published by the source.
Summary
POST /api/attachments.create lets any authenticated team member (regardless of role — member, viewer, etc.) create an attachment with preset: "import" or preset: "workspaceImport". Unlike every other code path in the file that accepts a documentId, this branch never calls authorize() on the target document, and it never checks the caller holds the createImport ability (Team Admin only) that gates the dedicated import feature. The result is:
- A privilege-escalation bypass of the Admin-only import feature: any team member can obtain valid cloud-storage upload credentials sized to the import-specific size limits (
FILE_STORAGE_IMPORT_MAX_SIZE/FILE_STORAGE_WORKSPACE_IMPORT_MAX_SIZE), which are meant to be reserved for thecreateImportability. - An unauthorized attachment-to-document association: the caller-supplied
documentIdis persisted on the createdAttachmentrow with zero ownership/read/update check, even when it points at a document the caller cannot access.
Steps To Reproduce
- Look at the dedicated, correctly-gated import endpoint:
server/routes/api/imports/imports.ts
and its policy inrouter.post( "imports.create", auth({ role: UserRole.Admin }), ... async (ctx) => { ... authorize(user, "createImport", user.team);server/policies/import.ts:allow(User, ["createImport", "listImports"], Team, (actor, team) => and(isTeamAdmin(actor, team), isTeamMu…
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY outline/outline