T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:58- Finding
Full Document Retrieval Exceeds the Permission-Checking Purpose
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 58-61; supporting response definition inreferences/api_notes.md, lines 20-31
Vulnerability Type: Excessive data access and violation of least privilege
Risk Level: MediumVulnerable Code
text For each link, call `feishu_fetch_doc` to verify read permission: feishu_fetch_doc(doc_id="<doc_id>")The documented response confirms that the operation returns the document body:
json { "success": true, "message": "Document fetched successfully", "doc_id": "xxx", "title": "Document title", "total_length": 1234, "markdown": "..." }Technical Analysis
The Skill's declared purpose is to determine whether the current Feishu identity can read each referenced document. This requires only an authorization result or narrowly scoped metadata. Instead, the workflow invokes
feishu_fetch_doc, which fetches document blocks and returns the complete document body in themarkdownfield.Consequently, sensitive content enters the tool response and Agent execution context even though the final report is intended to include only names, titles, links, and permission status. The instruction to report results only to the owner reduces visible disclosure but does not prevent unnecessary collection or exposure through model context, tool telemetry, execution traces, debugging logs, or downstream processing.
This behavior exceeds the minimum privileges and data access required for the declared functionality.
Attack Path
- A user supplies a Feishu Bitable URL or application token containing employee names and document links.
- The Skill reads the
Employee NameandLink Addressfields and extracts each document token. - For every token, the Skill invokes
feishu_fetch_doc. - For readable documents, the tool retrieves the title, metadata, blocks, and complete Markdown content.
- The full content enters the Agent/tool execution context despite being unnecessary for ...[truncated 977 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
feishu_fetch_docwith a dedicated Feishu permission-check or metadata endpoint that returns only an authorization status without downloading document blocks. - If no suitable API tool exists, implement a narrowly scoped access-check tool that performs the request internally and returns only:
- Document identifier
- Authorized/unauthorized status
- Minimal error classification
- Title only if strictly required by the output contract
- Ensure document bodies, block data, and Markdown are discarded before the response reaches the Agent context.
- Disable or redact sensitive response bodies in application logs, tool traces, telemetry, and error reports.
- Define how the result recipient is authenticated rather than relying only on the ambiguous term “owner.”
- Apply explicit batching limits and require confirmation before scanning unusually large tables to reduce the blast radius of accidental data access.
- Distinguish authorization failures from rate limits, transient network failures, and missing documents so that operational failures are not incorrectly reported as access denial.
- Replace
