Outlineで文書インポート時に権限のない共有領域へ公開される恐れ
Summary
Outlineの文書インポート機能で、親文書と別の書き込み不可のコレクションを同時に指定すると、権限チェックを経ずに別のコレクションへ文書が公開される問題です。影響を受けるのはOutlineの1.10.0より前の版で、1.10.0以降へ更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Outlineの文書インポート機能で、親文書と別の書き込み不可のコレクションを同時に指定すると、権限チェックを経ずに別のコレクションへ文書が公開される問題です。影響を受けるのはOutlineの1.10.0より前の版で、1.10.0以降へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| otherOutline |
< 1.10.0→ 1.10.0 |
1.10.0 |
Original description The description as published by the source.
Summary
documents.import authorizes the parent document but then writes into whichever collection the caller named. Sending parentDocumentId for a document you own together with collectionId for a collection you cannot write puts your file in that second collection, published, with no permission check on it at all. It works against a read only collection and against a private collection you are not a member of and cannot even open.
documents.create gets the same input right. Commit fecca544f, "Normalize permission logic between API/MCP doc creation", pulled that logic into authorizeDocumentCreate after GHSA-c43v-wwv4-9mcc. documents.import kept its own copy and was not brought along.
Details
server/routes/api/documents/documents.ts, the import handler:
if (parentDocumentId) {
parentDocument = await Document.findByPk(parentDocumentId, { userId: user.id });
if (parentDocument?.collectionId) {
collection = await Collection.findByPk(parentDocument.collectionId, { userId: user.id });
}
authorize(user, "createChildDocument", parentDocument, { collection });
} else if (collectionId) {
collection = await Collection.findByPk(collectionId, { userId: user.id });
authorize(user, "createDocument", collection);
}
const document = await DocumentImportTask.scheduleAndWait({
...
collectionId: collectionId ?? parentDocument?.collectionId,
parentDocumentId,
publish,
});
The schema only refuses the case where both ids are missing, so b…
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY outline/outline