T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:64- Finding
Excessive Feishu Permissions Violate Least-Privilege Principles
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 64-94
Vulnerability Type: Excessive cloud API permissions
Risk Level: MediumVulnerable Code Snippet
markdown ### 云盘 Drive | 权限 scope | 说明 | |-----------|------| | `drive:drive` | 云盘能力总览 | | `drive:file` | 文件基础操作 | | `drive:file:readonly` | 只读文件 | | `drive:file:download` | 下载文件 | | `drive:drive:readonly` | 只读云盘元信息 | ### 文档 Docx | 权限 scope | 说明 | |-----------|------| | `docx:document` | 文档基础能力 | | `docx:document:readonly` | 只读文档内容 | | `docx:document:write_only` | 写入文档 | ### 表格 Sheets | 权限 scope | 说明 | |-----------|------| | `sheets:spreadsheet` | 表格基础能力 | | `sheets:spreadsheet:read` | 读取表格 | ### 多维表格 Bitable | 权限 scope | 说明 | |-----------|------| | `bitable:app` | 多维表格应用 | | `bitable:app:readonly` | 只读多维表格 | ### 知识库 Wiki | 权限 scope | 说明 | |-----------|------| | `wiki:wiki` | 知识库基础 | | `wiki:node:read` | 读取知识库节点 |Technical Analysis
The documented workflow obtains a tenant access token, downloads a requested file, and parses its content. That read-oriented workflow does not require write access or broad base scopes for every Feishu service.
The permissions list nevertheless includes broad scopes such as
drive:drive,drive:file,docx:document,docx:document:write_only,sheets:spreadsheet,bitable:app, andwiki:wiki. The document labels the section as required permissions and does not distinguish mandatory read-only scopes from optional scopes. In particular,docx:document:write_onlyis inconsistent with the stated file-reading workflow.This expands the authority available to the skill and increases the consequences of token disclosure, agent compromise, or accidental misuse.
Attack Path
- A user follows the skill's required-permissions section and grants the listed broad and write-capable scopes.
- The skill exchanges the Feishu application credentials for a t ...[truncated 1024 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace broad scopes with the smallest read-only scope set needed for the documented workflow.
- Use
drive:file:readonlyanddrive:file:downloadwhere sufficient. - Request format-specific read scopes only when the corresponding file type or service is used.
- Remove
docx:document:write_onlyfrom the default permission list. - Clearly separate mandatory scopes from optional capabilities.
- Require explicit user authorization before enabling any write operation.
- Validate the granted scope set at runtime and reject unexpected write or administrative permissions.
- Use separate Feishu applications or credentials for read-only and write-capable workflows to limit compromise impact.
