Back to skill

Security audit

Gemini Browser Image

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Gemini image generation, but it gives broad control over a logged-in Chrome session through mutable browser-automation tooling and weakly scoped download-file handling.

Install only if you are comfortable giving the skill temporary control of a Chrome profile logged into Gemini. Use a dedicated low-privilege Chrome profile, keep remote debugging local, stop the MCP server after use, pin or review the browser-control dependency instead of using `@latest`, and verify downloaded files before copying them from Downloads.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:45
Finding

Execution of an Unpinned Mutable npm Dependency

Content
View full analysis
&& npx chrome-devtools-mcp@latest --autoConnect --experimentalStructuredContent --experimental-page-id-routing" ``` Equivalent unpinned commands also appear in the troubleshooting and README instructions: ```powershell npx chrome-devtools-mcp@latest --autoConnect ``` ```powershell npx chrome-devtools-mcp@latest --autoConnect --experimentalStructuredContent --experimental-page-id-routing ``` ### Technical Analysis The documented commands instruct users to fetch and execute the mutable `latest` release of `chrome-devtools-mcp` directly through `npx`. No exact version, lockfile, integrity hash, or other verification mechanism constrains the downloaded code. Because the package is used with `--autoConnect`, the executed dependency receives browser-automation capabilities over a Chrome instance that is expected to contain an authenticated Gemini session. The package version executed in the future can therefore differ from the version reviewed when this Skill was published. This is a supply-chain weakness rather than evidence that the current package is malicious. Exploitation would require compromise of the npm package, its publisher account, the package distribution channel, or a future malicious release. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or another part of its release pipeline. 2. The attacker publishes a malicious release and assigns it to the `latest` distribution tag. 3. A user follows the Skill instructions and runs `npx chrome-devtools-mcp@latest`. 4. `npx` downloads and executes the attacker-controlled package code locally. 5. The package starts with automatic browser connectivity and can interact with the remotely ...[truncated 1013 chars]
Remediation
View remediation
--autoConnect --experimentalStructuredContent --experimental-page-id-routing ``` 2. Install dependencies through a committed lockfile and use a deterministic installation mechanism such as `npm ci`. 3. Verify package provenance, publisher identity, release signatures where available, and npm integrity metadata before adoption. 4. Establish a controlled dependency-update process that reviews new versions before changing the pinned version. 5. Run the browser-control service under a dedicated, least-privileged operating-system account where practical. 6. Use a dedicated Chrome profile containing only the minimum account state required for Gemini. 7. Restrict the Chrome debugging endpoint to local access and terminate it immediately after the task. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:123
Finding

Unvalidated Selection of the Most Recently Modified Download

Content
View full analysis
" ``` The complete example repeats the same selection pattern: ```powershell $newFile = Get-ChildItem $env:USERPROFILE\Downloads -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1 Copy-Item $newFile.FullName "\\crayfish.png" ``` ### Technical Analysis The workflow assumes that the most recently modified file in the entire Downloads directory is the image produced by the current Gemini task. It does not verify: - That the file was created after generation started. - That its name matches the expected Gemini naming convention. - That it has an expected image extension or valid image signature. - That the file is associated with the current browser action. - That exactly one new matching download exists. - That the download is complete before it is copied. This creates a time-of-check and file-selection race. Another browser tab, application, synchronization process, or user action can place or update a file in Downloads after Gemini finishes. The unrelated file then becomes the first item returned by the timestamp sort and is copied under an image-looking destination name. ### Attack Path 1. The Skill starts an image-generation task and waits for Gemini to produce a downloadable image. 2. Before the selection command executes, another process or browser tab creates or modifies a file in the user's Downloads directory. 3. The unrelated file receives a newer `LastWriteTime` than the intended Gemini image. 4. The broad `Get-ChildItem` query selects that unrelated file because it sorts all files solely by modification time. 5. `C ...[truncated 1071 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1)May include surrounding context.

md
---
name: gemini-browser-image
description: Generate images with the user's own Chrome session and Gemini web UI. Use for article covers, illustrations, and social media visuals when the user explicitly asks for image generation or article images. Requires an already-authorized Gemini account and user-controlled browser session; does not handle credentials, bypass access controls, or solve CAPTCHAs.
---

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The README instructs users to run npx chrome-devtools-mcp@latest, which fetches and executes the newest package version at runtime rather than a reviewed, pinned release. If the upstream package is compromised or a breaking release is published, the agent could execute attacker-controlled code with access to browser automation, local files, and authenticated Gemini sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs use of a logged-in Chrome profile with remote debugging enabled, but does not clearly warn that this exposes powerful access to browser state, including authenticated sessions, cookies, and potentially sensitive open-page data. In this skill's context, that omission is especially dangerous because the automation stack can inspect and act within an already authenticated browser, amplifying the impact of misuse or compromise.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

This second occurrence repeats the same unsafe installation pattern in the English section, again encouraging execution of an unpinned @latest package from npm. Because this skill is designed to control a logged-in browser via remote debugging, compromise of that package could lead to session theft, arbitrary browser actions, and local system access through the agent environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documentation states that it will access the Downloads folder and copy generated files, but the warning is not presented as a clear user-facing security disclosure about filesystem access and file manipulation. In an agent context, unclear disclosure can cause users to authorize broader local file operations than they realize, increasing the risk of unintended data exposure or overwriting/misplacement of files.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill instructs users to launch an MCP server via npx chrome-devtools-mcp@latest, which pulls and executes the newest published package at runtime without version pinning or integrity control. Because this server is granted live access to the user's browser session and authorized Gemini account, a compromised or malicious upstream release could gain powerful access to page contents, downloads, and authenticated workflows.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The troubleshooting section repeats the unsafe pattern of running npx chrome-devtools-mcp@latest --autoConnect, again causing execution of whatever package version is currently published. In this skill's context, that package is connected to Chrome remote debugging and can interact with the user's logged-in browser, so a supply-chain compromise would have significant reach.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file is primarily written in Chinese, but the guidance says "尽量用英文描述,效果更好" (prefer describing in English) without offering a language choice or framing this as optional user preference. This can be read as steering users toward a specific language/locale despite no explicit opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.