T09 · Insecure Skill Coding Practices
- Location
SKILL.md:40- Finding
Persistent Screenshot May Expose Sensitive Account and API-Key Metadata
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 40-43
Vulnerability Type: Predictable, persistent storage of sensitive dashboard information
Risk Level: MediumComplete Code Snippet
bash agent-browser snapshot -i agent-browser screenshot quota.pngTechnical Analysis
The skill instructs the agent to capture the authenticated Kimi Code console in a screenshot and save it under the fixed filename
quota.png. The same workflow directs the agent to inspect API-key metadata, including API ID, name, creation time, partially hidden key material, and status.Persisting this dashboard image is unnecessary for producing the requested quota summary. The instructions do not require user consent for storage, restrictive file permissions, redaction of sensitive fields, a securely generated temporary filename, or deletion after processing. The predictable filename may also overwrite an existing file.
The issue does not expose full API keys based on the documented workflow, and no transmission of the screenshot to an external party is specified.
Attack Path
- A user invokes the skill while authenticated to Kimi Code.
- The agent opens the account console containing quota, subscription, and API-key metadata.
- The agent saves the visible console as
quota.pngin its current working directory. - The file remains after the quota report is generated because no cleanup step is defined.
- Another user or process with access to that directory reads the retained screenshot and obtains the displayed account metadata.
Impact Assessment
Exploitation requires local read access to the directory where the screenshot is stored. A successful exploit may disclose subscription details, usage and reset information, membership level, API-key names and identifiers, creation dates, status, and any partially masked key material visible on the page.
This does not directly grant elevated privileges o ...[truncated 193 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the screenshot command and extract only the minimum required values from the page snapshot or DOM.
- If visual capture is necessary, obtain explicit user consent before saving account information.
- Redact API-key metadata and unrelated account details before persistence.
- Use an operating-system-generated temporary file with a unique name and owner-only permissions rather than the predictable
quota.pngpath. - Delete the temporary image immediately after extracting the required information, including cleanup during errors or cancellation.
- Avoid reporting partially masked key material unless the user explicitly requests it; return only the key name and status by default.
- Prevent unintended overwrite by using exclusive file creation if a persistent artifact is explicitly requested.
