T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:39
- Finding
- Anonymous Public Edit Permissions Violate Least Privilege## Vulnerability Details **File Location**: `SKILL.md:39-49` **Additional Location**: `references/guide.md:86-96,103` **Vulnerability Type**: Overbroad anonymous document permissions **Risk Level**: High ### Vulnerable Code ```bash curl -X PATCH "https://open.feishu.cn/open-apis/drive/v1/permissions/{doc_id}/public?type=docx" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "link_share_entity": "anyone_editable", "external_access_entity": "anyone_can_edit", "security_entity": "anyone_can_edit", "comment_entity": "anyone_can_edit", "share_entity": "anyone" }' ``` The detailed guide also recommends making documents public immediately: ```text **Solution**: Set public permissions immediately after creation ``` ### Technical Analysis The Skill instructs agents to grant anonymous users edit, comment, sharing, security, and external-access capabilities. The detailed workflow presents this permission change as a routine step and recommends applying it immediately after document creation. Public anonymous editing is not required for the Skill's basic declared operations of creating, reading, or editing Feishu documents. Named collaborators, tenant-restricted sharing, or view-only links would provide narrower access. Applying anonymous edit permissions by default therefore violates least privilege. Anyone who obtains the document URL may be able to access and modify its contents without being individually authenticated or authorized as a collaborator. Document links can be exposed through chat history, forwarded messages, browser history, logs, or accidental sharing. ### Attack Path 1. A user asks an agent to create or populate a Feishu document. 2. The agent follows the Skill workflow and invokes the public-permission endpoint. 3. The document is configured so that anyone with access to the link can edit, comment, share, and potentially acc ...[truncated 917 chars]
- Remediation
- ## Remediation Suggestions 1. Keep newly created documents private by default. 2. Add only explicitly named users, groups, or applications as collaborators. 3. Grant the minimum required role, preferring view-only or comment-only access over edit access. 4. Require explicit user confirmation before enabling any public-link permission. 5. Display a clear warning explaining that anonymous links may expose document contents outside the intended tenant or collaborator set. 6. Do not automatically change security, external-access, comment, and sharing permissions as part of ordinary document creation. 7. If public sharing is explicitly required, prefer an expiration-controlled, view-only link and provide instructions for revoking it. 8. Update both `SKILL.md` and `references/guide.md` so that public access is documented as an exceptional, user-authorized operation rather than the default workflow.
