T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:94
- Finding
- Unconfirmed Relocation of Existing Notion Databases<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 94–101 and 124 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Instructions ```text If a database (not a page) named exactly `Reading List` exists: - If its parent is already `SECOND_BRAIN_ID`, do nothing — record `READING_LIST_ID` and skip to Step 3. - If its parent is something else, call `notion-move-pages` to move it under `SECOND_BRAIN_ID`. Record `READING_LIST_ID`. - Do NOT modify its existing schema, even if it differs from the spec below. Adopt as-is. ``` The same behavior is required for the Inbox database: ```text Same pattern as Step 2. Search → adopt-and-move if exists → otherwise create with: ``` ### Technical Analysis The skill performs a workspace-wide search for databases with the generic names `Reading List` and `Inbox`. It treats an exact title match as sufficient proof that a database belongs to this skill and may move that database beneath `SECOND_BRAIN_ID`. An integration-visible database can belong to another user, team, workflow, or project. Visibility through the Notion integration does not establish ownership or authorization to reorganize the object. The skill does not validate a stable database identifier, inspect provenance, limit adoption to descendants of the selected parent, or obtain user confirmation before moving an existing resource. Moving a database also changes its workspace hierarchy and may alter the practical access context inherited from its parent. ### Attack Path 1. An attacker or another workspace collaborator creates a database named exactly `Reading List` or `Inbox`. 2. The database is placed somewhere visible to the Notion integration. 3. A user invokes the second-brain setup skill. 4. The skill performs a global internal search using the generic database name. 5. The attacker-controlled or unrelated database is returned as an exact-name match. 6. Because its current pa ...[truncated 798 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Only adopt a database automatically when it is already a direct child of the selected `Second Brain` page. 2. If an exact-name match exists elsewhere, display its title, current parent, and URL, then require explicit user confirmation before moving it. 3. Do not use a generic title as the sole resource identity. Persist and validate database IDs created by the skill where possible. 4. If ownership cannot be established, create a new database under `Second Brain` or stop with a conflict report rather than modifying the existing object. 5. Before any move, verify that the source database is within a user-approved workspace subtree and that the destination's sharing configuration is appropriate. 6. Report duplicate exact-name matches instead of selecting one implicitly. ]]>
