T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:304- Finding
Direct Access to the Browser Cookie Database Bypasses Page-Level Security Boundaries
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 304
Vulnerability Type: Least-privilege violation and sensitive credential access
Risk Level: HighComplete documentation excerpt translated into English:
text document.cookie cannot obtain HttpOnly cookies. If complete cookies are required, consider reading the SQLite database directly from the browser files (the file-locking issue must be handled).Technical Analysis
The Skill recommends directly reading the browser cookie SQLite database when
HttpOnlycookies cannot be accessed throughdocument.cookie.HttpOnlyis a deliberate browser security boundary intended to prevent page scripts from reading authentication cookies. Accessing the browser's underlying cookie database circumvents that page-level restriction and exposes credential material outside the scope of normal DOM automation.Complete browser cookies can include authenticated session tokens for multiple unrelated services in the selected browser profile. Direct database access is not necessary for the Skill's declared navigation, clicking, screenshot, and DOM-extraction functions and therefore exceeds the minimum privileges required.
The instruction does not itself transmit cookies or provide a complete extraction implementation. Nevertheless, an Agent with the declared
readandexectools could use the recommendation to locate, copy, unlock, decrypt, and inspect browser credential storage.Attack Path
- A user invokes the Skill for an authenticated browser-automation task.
- The target operation encounters an
HttpOnlycookie that cannot be read through page JavaScript. - Following the Skill's guidance, the Agent locates the browser profile's cookie SQLite database.
- The Agent copies or otherwise handles the locked database and attempts to read or decrypt its contents.
- Session cookies for the target site, and potentially unrelated sites in the same profi ...[truncated 701 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the recommendation to read browser cookie databases directly.
- Explicitly prohibit extracting, decrypting, copying, displaying, or transmitting authentication cookies and browser credential stores.
- Limit automation to page-scoped CDP operations required for navigation, interaction, screenshots, and approved DOM extraction.
- Use a dedicated automation browser profile containing only the accounts needed for the specific task.
- Require explicit, informed user approval before any credential-sensitive operation.
- Apply domain allowlists and prevent access to cookies belonging to sites outside the active task.
- Redact session identifiers and other credentials from logs, tool output, screenshots, and generated files.
- If authenticated API access is genuinely required, use a narrowly scoped, revocable token supplied through an approved secret-management mechanism instead of browser session extraction.
