T07 · Tool Hijacking and Spoofing
- Location
skill.md:89- Finding
Execution of an Unbundled Script from an External Hard-Coded Location
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, lines 89–95
Vulnerability Type:T07: Tool Hijacking and Spoofing
Risk Level: Mediumbash cd C:/Users/10911/.claude/skills/douyin-text && python extract.py --raw-json '<user-provided-link>'bash cd C:/Users/10911/.claude/skills/douyin-text && python extract.py --raw-json --whisper-model medium 'https://v.douyin.com/xxxxx/'Technical Analysis
The audited project contains only
skill.md; the requiredextract.pyis not included. However, the Skill instructs the agent to change into a hard-coded, machine-specific directory outside the reviewed artifact and execute anextract.pyfound there.This breaks the trust relationship between the reviewed Skill and the code that actually runs. The behavior of the external script cannot be established from the package under audit, and any file occupying the specified path can become the effective implementation. A local attacker, compromised installer, or another process able to write to that directory could replace or create the script before invocation.
The Skill also documents browser-cookie import support and requires user-supplied options to be forwarded to the absent script. Because the implementation is unavailable, cookie handling, argument validation, network destinations, and data retention cannot be verified.
Attack Path
- An attacker gains write access to
C:/Users/10911/.claude/skills/douyin-text/, or compromises the process that installs files there. - The attacker creates or replaces
extract.pywith attacker-controlled Python code. - A user invokes the Douyin transcription Skill.
- The agent follows the documented workflow and executes the substituted script with the privileges of the agent process.
- The malicious script can access resources available to that process, potentially including supplied URLs, local files, environment variables, genera ...[truncated 1082 chars]
- An attacker gains write access to
- Remediation
View remediation
Remediation Suggestions
- Bundle
extract.pywithin the reviewed Skill package so that the executable implementation is included in security review and distribution. - Resolve the script relative to a trusted, canonical Skill root instead of using a user-specific absolute path.
- Verify the script before execution using a package signature, manifest hash, or another integrity mechanism that covers all executable files.
- Restrict accepted command-line options to a documented allowlist. Parse and validate the URL and model name rather than forwarding arbitrary user-provided arguments.
- Invoke the script through an argument-array API without shell interpretation where the host environment supports it.
- Make browser-cookie access explicitly opt-in rather than default behavior. Limit access to the required browser profile and domain, and avoid copying or persisting cookie material.
- Document all network destinations and ensure sensitive cookie or transcript data is never sent to undeclared endpoints.
- Include pinned dependency declarations and lockfiles for the Python runtime, downloader, media-processing libraries, and Whisper implementation.
- Fail closed if the bundled script is missing or fails integrity validation; do not search alternate directories or execute another file with the same name.
- Bundle
