T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:30- Finding
Unnecessary Default Access to Browser Authentication Cookies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30-42
Vulnerability Type: Least-privilege violation through unnecessary access to sensitive browser session data
Risk Level: MediumVulnerable Code
markdown 2. **Execute Subtitle Download** (Only if `yt-dlp` is found): - **Tip**: Always add `--cookies-from-browser` to avoid sign-in restrictions. Default to `chrome`. - **Retry Logic**: If `yt-dlp` fails with a browser error (e.g., "Could not open Chrome"), ask the user to specify their available browser (e.g., `firefox`, `safari`, `edge`) and retry. ```bash # Get the title first (try chrome first) yt-dlp --cookies-from-browser=chrome --get-title "[VIDEO_URL]" # Download subtitles yt-dlp --cookies-from-browser=chrome --write-auto-sub --write-sub --sub-lang zh-Hans,zh-Hant,en --skip-download --output "<Video Title>.%(ext)s" "[VIDEO_URL]" ```Technical Analysis
The Skill instructs the agent to include
--cookies-from-browser=chromein everyyt-dlpinvocation. This option causesyt-dlpto locate, decrypt, and load cookies from the user's Chrome profile, potentially including authenticated Google and YouTube session cookies.Public video metadata and captions ordinarily do not require authentication. Consequently, accessing browser cookies before an authentication-specific failure exceeds the minimum privileges needed for the declared transcript-extraction functionality. The fallback advice may extend the same access to Firefox, Safari, or Edge profiles.
The cookies are used by
yt-dlpin requests to YouTube. The reviewed Skill does not instruct the agent to transmit them to an unrelated third-party endpoint, so deliberate credential exfiltration is not established. Nevertheless, exposing authenticated browser state to a local executable increases the consequences of a compromised, outdated, replaced, or unexpectedly configuredyt-dlpinstallation....[truncated 1255 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
--cookies-from-browserfrom the default commands and attempt public metadata and subtitle extraction anonymously first. - Enable browser-cookie access only after an error clearly indicates that authentication is required, rather than after an unrelated download failure.
- Obtain explicit, informed user consent before reading a browser profile. Explain that the operation exposes authenticated browser state to
yt-dlp. - Ask the user to confirm that they are authorized to access the restricted content.
- Prefer a dedicated browser profile containing only the minimum cookies required for YouTube instead of the user's primary profile.
- Avoid printing, persisting, or including cookie values in diagnostic output.
- Verify that
yt-dlpis obtained from a trusted source and kept updated before granting it access to authenticated browser data. - Narrow the front-matter tool allowlist by replacing wildcard Chrome MCP access with only the page, snapshot, click, script-evaluation, and close operations required by the documented workflow.
- Remove
