T09 · Insecure Skill Coding Practices
- Location
SKILL.md:8- Finding
Unsafe Solicitation of Authentication Cookies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 8-10
Vulnerability Type: Solicitation and unsafe handling of reusable session credentials
Risk Level: MediumVulnerable Code Snippet
The vulnerable instruction, rendered in English to comply with the report language requirement, is:
markdown In the `browser_subagent` task instructions, explicitly require it to: 1. After the page loads, if a login dialog appears (usually a QR code), pause or prompt the user to scan the code. If supported, the agent may wait for the user to complete the scan. 2. If login cannot be completed automatically, use `notify_user` to clearly tell the user that manual intervention or the provision of Cookies or other assistance is required.Technical Analysis
The instruction explicitly permits the agent to ask the user to provide authentication cookies when automatic login is unavailable. Session cookies are sensitive bearer credentials: possession may be sufficient to impersonate the authenticated user without knowing the account password or completing an additional login challenge.
This exceeds the minimum access needed for the declared task. The post can instead be accessed through an official interactive login flow in which the user scans a QR code directly on the service page. The Skill provides no controls for secret entry, domain scoping, transmission security, log redaction, retention, deletion, expiration, or prevention of cookie reuse.
The issue is an insecure Skill configuration rather than evidence of intentional credential theft. No instruction to exfiltrate or misuse the cookies was identified, but soliciting reusable credentials creates an avoidable exposure path.
Attack Path
- The agent opens a user-supplied Xiaohongshu post URL.
- The website displays a login barrier.
- Automatic authentication is unavailable.
- Following the Skill instructions, the agent uses
notify_userto request manual assistance, potentially includi ...[truncated 1015 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove every instruction that asks users to provide cookies, session tokens, authorization headers, or similar reusable credentials.
- Require authentication exclusively through the official Xiaohongshu page, preferably by having the user complete QR-code authentication directly in the interactive browser session.
- If authentication cannot be completed safely, stop processing and explain that the content cannot be accessed rather than requesting credentials.
- Prevent authentication values from being included in prompts, notifications, conversation history, telemetry, screenshots, or tool logs.
- If a platform-approved session-transfer mechanism is genuinely necessary, use a dedicated secret-input channel with:
- strict destination-domain scoping;
- ephemeral in-memory handling;
- automatic log and output redaction;
- minimum required cookie selection;
- no persistence across runs;
- immediate deletion after use; and
- clear user consent and revocation guidance.
- Add explicit instructions that the agent must never request passwords, cookies, one-time codes, recovery codes, or other account credentials.
