Back to skill

Security audit

video-downloader-by-browser

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent video downloader, but it handles browser sessions, cookies, and password-related data in ways that are too broad and persistent for automatic approval.

Install only if you are comfortable with this skill creating reusable browser login state and plaintext cookie files for streaming sites. Use it in a dedicated browser profile, avoid pointing CHROME_PROFILE at your everyday browser, delete workdir cookie and password diagnostic files after use, and only download content you are authorized to save.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Warning
Location
SKILL.md:130
Finding

Overbroad termination of unrelated Google Chrome processes

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:130-132
Vulnerability Type: Overbroad destructive process termination
Risk Level: Medium

Code Snippet:

markdown
- **启动前先确认没有残留的本 skill Chrome 实例**(`pkill -f "Google Chrome.app"` 或 stop.flag),
  同一 profile 不能被两个 Chrome 同时占用。

The same instruction is duplicated in repo/SKILL.md:130-132.

Technical Analysis

The Skill instructs the agent to ensure that no prior Skill-controlled Chrome instance remains, but the suggested pkill -f "Google Chrome.app" command is not scoped to the Skill's process, profile directory, PID, or working directory. It can match and terminate unrelated Google Chrome processes belonging to the current user.

The task only authorizes management of the dedicated browser instance launched for video downloading. Terminating unrelated browser sessions crosses that authorization boundary. The documented stop.flag alternative is safer, but its presence does not technically constrain or prevent use of the overbroad pkill command.

Attack Path

  1. The user invokes the Skill to download a video while unrelated Google Chrome sessions are active.
  2. The agent follows the startup instruction in SKILL.md.
  3. To clear an allegedly residual Skill browser, the agent executes:
    bash
    pkill -f "Google Chrome.app"
    
  4. The operating system terminates all processes whose command line matches that pattern, including Chrome sessions not launched by the Skill.
  5. The user's unrelated browser activity is interrupted without process-specific validation or confirmation.

Impact Assessment

Exploitation does not grant additional privileges, but it allows the Skill's instructions to affect processes outside the authorized video-download workflow. Unrelated personal or business browsing sessions may be terminated, causing service interruption and possible loss of unsaved form, document, or application state.

No eviden ...[truncated 277 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the broad pkill -f "Google Chrome.app" instruction.
  • Use stop.flag as the normal shutdown mechanism for Skill-managed browser instances.
  • Record the PID of the browser process launched by the Skill and terminate only that PID.
  • Before terminating a recorded PID, verify that its executable, command line, profile path, and expected parent process correspond to the Skill-managed instance.
  • If ownership cannot be established, stop and request explicit user confirmation rather than terminating matching processes.
  • Apply the same correction to the duplicated instruction in repo/SKILL.md.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (106)

Ssd 3

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The command set is expressly designed to inspect login state and export all cookies for reuse, including account-identifying and authentication material. In context, this turns a video downloader into a credential/session extraction utility, which is especially dangerous because it uses a shared persistent browser profile spanning multiple sites and tasks.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill explicitly includes QR-login flows, cookie capture, and persistence of authenticated session material to disk for Bilibili. Even though the document warns against shipping real credentials, the workflow normalizes collecting and storing live session cookies, which are sensitive bearer tokens that could be reused if the working directory is exposed or mishandled.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document provides operational guidance for automated access to password-protected video pages and high-speed segmented downloading, but omits warnings or controls around authorization, legal restrictions, account use, and privacy implications. In this skill's context, that omission makes misuse substantially more likely because it packages restricted-content acquisition as a routine workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The cookies command exports the full browser cookie jar, including session and httpOnly authentication cookies, to disk. For a skill whose stated purpose is intercepting media URLs and downloading video segments, this exceeds the minimally necessary scope and creates a direct account/session theft risk if the working directory or artifacts are accessed by another process or user.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Sensitive cookies are written to cookies.json without any interactive warning, consent checkpoint, or storage protection. Because these cookies can authenticate the user to streaming services and possibly related ecosystems, disk persistence materially raises the risk of session hijacking and unauthorized account access.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The password automation path logs the typed password-derived field value and captures screenshots shortly after entering the viewing password, while other diagnostics like pwinfo can also persist input values and surrounding HTML. This can leak secrets into files under the working directory, exposing them to other local users, backup systems, or later collection by other tooling.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The script performs substantial network activity: direct HTTP requests, a browser that loads arbitrary pages, and capture of streaming URLs and signed CDN requests. If the skill manifest does not declare this capability, users and policy enforcement layers may be misled about what the skill can exfiltrate or access, especially since it is explicitly aimed at authenticated and protected video flows.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Using os.popen('which ffmpeg') delegates executable discovery to the current shell environment and PATH, allowing a malicious or hijacked PATH to cause an unintended ffmpeg binary to be selected. In the context of a video-downloader skill that processes untrusted content and may be run manually on varied user systems, this increases the chance of executing attacker-controlled local binaries or trojaned wrappers.

Content

Scanner excerpt · repo/scripts/merge_verify.py (reported line 67)May include surrounding context.

python
import imageio_ffmpeg
        return imageio_ffmpeg.get_ffmpeg_exe()
    except Exception:
        ff = os.popen('which ffmpeg').read().strip()
        if ff:
            return ff
        raise SystemExit('未找到 ffmpeg,请先 pip install imageio-ffmpeg')

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented capabilities explicitly include dumping browser/session-related data as part of normal operation, signaling that sensitive data export is an intended feature rather than an accidental side effect. In a tool that maintains a shared persistent profile, this materially increases the risk of exposing authenticated session data across tasks or users.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The password commands are built not just to submit a password but also to inspect, read back, log, screenshot, and persist password-related state. That handling of user-provided secrets exceeds what is necessary for playback automation and creates direct exposure of credentials to disk and logs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The cookies command exports the full browser cookie jar, including httpOnly authentication cookies, to disk in cookies.json. That exceeds the stated need of media URL capture and enables session hijacking or reuse of authenticated browser state across services if the file is accessed by another process, user, or agent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The pwinfo command persists the current password input value together with dialog HTML to pwinfo.txt. This directly records a user secret to disk, creating unnecessary credential exposure through local file access, backups, logs, or later exfiltration.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The automatic password entry flow saves a screenshot immediately after typing the password, which may capture the secret on screen or nearby account information. Persisting such images without explicit disclosure creates an avoidable record of sensitive credentials.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script explicitly describes and implements a process to intercept signed m3u8/TS URLs, rewrite byte ranges to obtain a full stream, and repackage the result, including for login-, password-, or membership-gated platforms. In this skill context, that is not merely generic downloading; it is operational guidance for bypassing platform access controls and extracting restricted streaming media, which materially increases abuse potential.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Using os.popen('which ffmpeg') spawns a shell and relies on the current PATH to resolve the executable. In an environment where an attacker can influence PATH or shell behavior, the script may locate and later execute a malicious ffmpeg binary, which is especially relevant here because the skill processes downloaded content and may be run in user-controlled workspaces.

Content

Scanner excerpt · scripts/merge_verify.py (reported line 67)May include surrounding context.

python
import imageio_ffmpeg
        return imageio_ffmpeg.get_ffmpeg_exe()
    except Exception:
        ff = os.popen('which ffmpeg').read().strip()
        if ff:
            return ff
        raise SystemExit('未找到 ffmpeg,请先 pip install imageio-ffmpeg')

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · repo/scripts/setup.sh (reported line 108)May include surrounding context.

sh
for f in "$SCRIPT_DIR"/*.py; do
    "$PY" -m py_compile "$f" 2>/dev/null && echo "  $(basename "$f") ✓" || echo "  ❌ $(basename "$f") 语法错误"
  done
  rm -rf "$SCRIPT_DIR/__pycache__"
fi

echo ""

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/setup.sh (reported line 108)May include surrounding context.

sh
for f in "$SCRIPT_DIR"/*.py; do
    "$PY" -m py_compile "$f" 2>/dev/null && echo "  $(basename "$f") ✓" || echo "  ❌ $(basename "$f") 语法错误"
  done
  rm -rf "$SCRIPT_DIR/__pycache__"
fi

echo ""

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest emphasizes a user-visible headed browser as the operating model for this skill. Yet the documented implementation includes iqiyi_grab.py described as using a headless browser, which directly contradicts that stated approach rather than merely omitting detail.

Content

No source excerpt is available for this finding.