Back to skill

Security audit

Gemini Browser

Security checks for vulnerabilities and agentic risk

Overview

The skill is transparent about controlling Gemini in Chrome, but needs review because it uses raw JavaScript in a real logged-in browser tab in a way that can mishandle untrusted prompt text.

Install only if you are comfortable letting the agent control a manually attached Gemini tab in a real Chrome session. Use a dedicated Chrome profile and non-primary Google account, avoid sending untrusted copied text through the documented JavaScript snippet unless it is safely encoded as data, and prefer DOM/text extraction over the global clipboard when possible.

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

Warning
Location
SKILL.md:54
Finding

Untrusted Query Interpolation Enables JavaScript and HTML Injection

Content
View full analysis
request={ "kind": "evaluate", "fn": "(() => { const editor = document.querySelector('div.ql-editor[contenteditable=\"true\"]'); if (!editor) return 'editor not found'; editor.focus(); editor.innerHTML = '

YOUR_QUERY_HERE

'; editor.dispatchEvent(new Event('input', { bubbles: true })); return 'ok'; })()" } ``` The same unsafe pattern is also documented in the complete workflow: ```javascript browser action=act profile=chrome targetId= request={ "kind": "evaluate", "fn": "(() => { const editor = document.querySelector('div.ql-editor[contenteditable=\"true\"]'); if (!editor) return 'editor not found'; editor.focus(); editor.innerHTML = '

What is quantum computing?

'; editor.dispatchEvent(new Event('input', { bubbles: true })); return 'ok'; })()" } ``` ### Technical Analysis The documented workflow instructs the agent to replace `YOUR_QUERY_HERE` inside a JavaScript string passed to the CDP `evaluate` operation. The query is therefore inserted into two executable interpretation contexts without any documented validation or encoding: 1. A single-quoted JavaScript string literal. 2. An HTML parsing sink through `editor.innerHTML`. A query containing a single quote, JavaScript delimiters, or HTML markup can change the structure of the generated expression rather than being treated exclusively as text. For example, a value shaped like the following could terminate the intended string and introduce another JavaScript statement: ```text

'; ATTACKER_CONTROLLED_JAVASCRIPT; // ``` After direct substitution, the browser would evaluate attacker-controlled syntax in the context of the attached Gemini page. Even when JavaScript string brea ...[truncated 2031 chars]
Remediation
View remediation
{ const editor = document.querySelector( 'div.ql-editor[contenteditable="true"]' ); if (!editor) { return 'editor not found'; } editor.focus(); editor.textContent = query; editor.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertText', data: query })); return 'ok'; })(SAFELY_BOUND_QUERY) ``` `SAFELY_BOUND_QUERY` must be supplied as data through the tool interface, not replaced with raw text inside the expression. If binding is unavailable, use a browser action that natively fills editable elements and keeps the input outside JavaScript source code. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs the agent to read the system clipboard with pbpaste, which expands access beyond the stated task of querying Gemini and returning a response. Because this skill runs against a real logged-in Chrome session and the clipboard is a shared OS resource, the agent could inadvertently or intentionally capture unrelated sensitive data such as passwords, tokens, or copied documents.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.