Back to skill

Security audit

Browser Session Manager

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Jimeng automation guide, but it handles raw login sessions and can submit account actions with weak scoping and safeguards.

Install only if you are comfortable storing and replaying Jimeng browser session data locally. Treat the JSON session file like a password, keep it out of shared /tmp paths and source control, run the browser in a contained environment, and review every generation request before allowing it to spend credits or upload private prompts/images.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/browser-session-manager.js:94
Finding

Arbitrary-Origin Injection of Sensitive Browser Storage

Content
View full analysis
0) { console.log(`💾 设置 ${Object.keys(sessionData.localStorage).length} 个 localStorage 项...`); await page.evaluate((data) => { for (const [key, value] of Object.entries(data)) { try { localStorage.setItem(key, value); } catch (e) { console.error(`设置 localStorage[${key}] 失败:`, e); } } }, sessionData.localStorage); } // Apply sessionStorage if present if (sessionData.sessionStorage && Object.keys(sessionData.sessionStorage).length > 0) { console.log(`📦 设置 ${Object.keys(sessionData.sessionStorage).length} 个 sessionStorage 项...`); await page.evaluate((data) => { for (const [key, value] of Object.entries(data)) { try { sessionStorage.setItem(key, value); } catch (e) { console.error(`设置 sessionStorage[${key}] 失败:`, e); } } }, sessionData.sessionStorage); } ``` The target is taken directly from the command line: ```javascript const [url, sessionJsonPath, screenshotPath] = args; applySessionData(url, sessionJsonPath, { screenshotPath }) ``` ### Technical Analysis The session manager accepts an unrestricted target URL, navigates to that URL, and writes every supplied `localStorage` and `sessionStorage` value into the active origin. Web Storage is scoped to the currently loaded origin. Consequently, if the caller supplies an attacker-controlled URL, sensitive values from a Jimeng session export are not restored to Jimeng. Instead, they are inserted into the attacker' ...[truncated 1948 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/browser-session-manager.js:21
Finding

Chromium Sandbox Disabled While Processing Remote Web Content

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
jimeng-final.js:5
Finding

Predictable Shared Temporary Paths Used for Session Data and Screenshots

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
jimeng-final.js:155
Finding

Ambiguous UI Targeting Can Trigger Unintended Credit-Consuming Actions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (13)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document explicitly instructs exporting and reusing authenticated cookies and localStorage, then injecting them into a Playwright browser context to assume an existing logged-in session. That enables account/session impersonation and bypasses normal authentication controls if the session file is mishandled, reused without consent, or applied to another user's credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill tells users to export cookies and localStorage and save them to JSON, but does not warn that these artifacts are effectively credentials and may grant direct account access. This omission materially increases the chance of credential leakage, unsafe sharing, accidental commits, or reuse outside the intended environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script reads cookies and localStorage from /tmp/jimeng-session.json and injects them into a Playwright browser context, allowing it to impersonate an authenticated user without any visible consent, validation, or scope restriction. In an unknown-purpose skill, this enables account misuse and unauthorized actions against the target service using stolen or preexisting session material.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

Loading cookies and localStorage from disk and silently injecting them into the browser handles sensitive session credentials without notice, auditability, or access controls. This can expose or misuse authentication artifacts, especially in shared environments where /tmp data may be stale, cross-user, or attacker-controlled.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The automation navigates to an external site, populates content, changes model and duration settings, and attempts to press the submit button, causing remote actions on behalf of the logged-in user. Because the skill has no trustworthy stated business purpose or user confirmation step, it can spend credits, generate content, or trigger other account-linked operations without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script fills a prompt and submits it to a third-party website without any user-facing disclosure that the text will be transmitted externally. This creates a privacy and data-handling risk because users may unknowingly send sensitive or proprietary content to a remote service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document identifies specific authentication cookies and tokens and explains using exported browser session data to access authenticated Jimeng pages. This enables account/session reuse and lowers the barrier to unauthorized access if the session export is stolen, shared, or misused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The troubleshooting guidance explicitly suggests using a different IP or proxy when rate limited, which can facilitate evasion of service anti-abuse controls. In a session-automation guide, this goes beyond benign debugging and provides operational advice for bypassing provider restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code contains multiple user-visible console messages and usage instructions exclusively in Chinese, including startup, progress, error, and help text. Because the skill does not provide any language selection or indicate that it is intentionally region-specific, it violates the language/locale policy for natural-language content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The guide's core purpose is browser-driven submission to an AI video site, but it also prescribes use of ImageMagick's convert command as part of the workflow. Spawning external tooling is a materially broader capability than interacting with the target website and is not inherently required for browser automation itself.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The automation uploads local image files and submits prompt text to a third-party remote service without clearly warning users that local content will be transmitted off-host. In workflows involving private, regulated, or proprietary data, this can cause unintended data disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
6% confidence
Finding

After review, there is no clear natural-language policy violation because the file does not require a specific language or locale for user interaction. Mentions of Jimeng and Chinese domain names are contextual rather than mandatory language restrictions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The usage string says the command expects <url> <session-json-path> [screenshot-path], but both example commands place /session.json inside the URL position instead of as the second argument. This is an active contradiction in the inline documentation because following the examples would not match how the code parses const [url, sessionJsonPath, screenshotPath] = args.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.