Back to skill

Security audit

CDP浏览器大师

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is disclosed, but it can expose logged-in browser session cookies as reusable credentials and lacks sufficient scoping or warnings.

Install only if you specifically need local CDP browser automation and are comfortable with the agent controlling an authenticated browser. Avoid using it with your normal logged-in browser profile; use a disposable profile, close the remote debugging port after use, and do not allow it to return raw cookies, session tokens, or Cookie headers.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:165
Finding

Authenticated Session Cookie Exposure Through CDP

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:165-170
Vulnerability Type: Extraction and return of HttpOnly authentication cookies
Risk Level: High

Vulnerable Code

javascript
const { cookies } = await cdpSession.send('Network.getCookies', {
  urls: [targetUrl],
});
const cookieHeader = cookies
  .map(c => `${c.name}=${c.value}`)
  .join('; ');

Technical Analysis

The Skill instructs the Agent to use the Chrome DevTools Protocol to extract cookies, including cookies protected by the HttpOnly attribute. It then combines their names and values into a reusable HTTP Cookie header.

HttpOnly normally prevents page JavaScript from accessing session cookies, reducing the risk of credential theft through script execution. CDP operates outside that browser security boundary and can retrieve these protected values. Returning the resulting header moves bearer-equivalent authentication credentials from the browser's cookie store into Agent output, transcripts, logs, or downstream tools.

Cookie extraction is not required for the Skill's primary browser-navigation, clicking, rendering, screenshot, or DOM-extraction capabilities. Unconditionally supporting raw cookie export therefore exceeds the minimum privileges necessary for most declared functionality.

No fixed attacker-controlled destination or explicit third-party exfiltration endpoint was found. The vulnerability is nevertheless exploitable when an untrusted task, prompt, webpage, or downstream component induces the Agent to invoke the cookie-export operation and disclose its result.

Attack Path

  1. A user starts a normal, authenticated Edge or Chrome profile with remote debugging enabled.
  2. The Skill connects to that browser through CDP.
  3. The user processes an untrusted request or webpage that causes the Agent to invoke the documented cookie-retrieval operation for an authenticated origin.
  4. Network.getCookies retrieves c ...[truncated 1208 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the get_cookies action and raw cookie-export example unless exporting credentials is an essential, explicitly documented requirement.
  2. Keep authentication cookies inside the browser rather than returning them to the Agent, user-visible output, logs, or downstream tools.
  3. If cookie-assisted requests are indispensable, perform them inside a narrowly scoped trusted component and return only the non-sensitive response data.
  4. Require explicit, per-operation user confirmation before accessing cookies, clearly identifying the requested origin and explaining that session credentials are involved.
  5. Enforce a strict allowlist of approved HTTPS origins. Reject wildcard domains, redirects to unapproved origins, and arbitrary user-supplied cookie targets.
  6. Never construct or return a complete reusable Cookie header. Return only non-sensitive metadata such as cookie count, domain, expiration, and security attributes when needed for diagnostics.
  7. Completely redact cookie values from console output, execution logs, error messages, Agent transcripts, screenshots, and telemetry.
  8. Use a dedicated disposable browser profile rather than the user's ordinary logged-in profile, and grant that profile access only to accounts required for the current task.
  9. Bind the debugging interface to loopback, prevent remote access to the CDP port, and close the debugging session immediately after use.
  10. Add automated tests that fail if cookie values, authorization headers, session tokens, or other credentials appear in returned results or logs.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill advertises cookie extraction from logged-in browser sessions, including sensitive session data, without a prominent warning about credential exposure or account takeover risk. In this context, the skill is specifically designed to operate on authenticated browser state, making such omissions especially dangerous.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill directly instructs retrieving and returning full browser cookies, including HttpOnly session cookies, from a logged-in browser session. These are highly sensitive credentials; exposing them to the caller or logs can immediately enable impersonation and account hijacking.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The example shows how to retrieve HttpOnly cookies and convert them into a reusable Cookie header, but provides no meaningful warning that these values are equivalent to active session credentials. This materially lowers the barrier to credential exfiltration and reuse against authenticated services.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The example code gathers all cookies and serializes them into a reusable Cookie header string for return to the caller. That transforms browser-stored credentials into a portable authentication artifact that can be replayed outside the browser, substantially increasing the chance of session theft and abuse.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documented output format explicitly allows cookie strings to be returned as ordinary result data. Treating session cookies as normal output makes accidental disclosure via agent responses, logs, telemetry, or chaining into other tools much more likely.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill claims returned content excludes sensitive credentials, but elsewhere explicitly documents extraction and return of login cookies, including HttpOnly cookies. This contradiction normalizes exfiltration of active session material and could directly enable account/session hijacking if the output is exposed to a caller, logs, or downstream tools.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest markets the skill as a broad coding/deployment assistant, while the actual content focuses on CDP browser control, scraping, logged-in session reuse, and cookie extraction. This scope mismatch increases the chance the skill is auto-invoked in unrelated contexts where users and orchestrators would not expect access to a live authenticated browser session.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation language is broad enough to match many generic development requests, even though the skill provides powerful browser automation and access to authenticated session context. Overbroad routing increases accidental invocation and raises the risk of unintended scraping, account interaction, or exposure of sensitive browser data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill claims command execution is restricted to a safe allowlist and forbids user-input command composition, yet the skill exposes generic exec capability and command execution workflows without enforcing or documenting real constraints. This can mislead users and platform controls into trusting an execution surface that may permit unsafe system command use.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The support-center answer at L340 states that some features require configuring platform API keys, and related sections discuss API authentication failures and API connection initialization (L317-L319, L351-L353, L374-L376). But the actual skill content consistently describes local browser remote-debugging/CDP workflows against Edge/Chrome rather than API-backed integrations. This is an active documentation-to-function mismatch rather than mere incompleteness.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.