Skip to content
Medium

Attachment Import Preset Authorization Bypass

GHSA-3jwc-gwg4-jqrq First seen on SecPulse

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

PackageAffected → Fixed
otherOutline
< 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:

  1. 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 the createImport ability.
  2. An unauthorized attachment-to-document association: the caller-supplied documentId is persisted on the created Attachment row with zero ownership/read/update check, even when it points at a document the caller cannot access.

Steps To Reproduce

  1. Look at the dedicated, correctly-gated import endpoint: server/routes/api/imports/imports.ts
    router.post(
      "imports.create",
      auth({ role: UserRole.Admin }),
      ...
      async (ctx) => {
        ...
        authorize(user, "createImport", user.team);
    
    and its policy in 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

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details