T01 · Skill Instruction Hijacking
- Location
fetch-docs.js:143- Finding
Untrusted Remote Documentation Can Inject Instructions into the Consuming AI Agent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This documentation-fetching skill is coherent, but needs review because it can load arbitrary remote content directly into an AI agent and fetch unrestricted URLs without strong safeguards.
Install only if you are comfortable with the agent fetching documentation from the network. Prefer known trusted project names or trusted HTTPS documentation URLs, avoid internal or private-network URLs, treat fetched text as untrusted reference material, and review content before letting an agent act on it or before using --save.
fetch-docs.js:143Untrusted Remote Documentation Can Inject Instructions into the Consuming AI Agent
fetch-docs.js:36Arbitrary URL Fetching and Unrestricted Redirects Permit SSRF
fetch-docs.js:49Remote Responses Are Buffered Without an Enforced Size Limit
The skill explicitly encourages fetching documentation from arbitrary URLs and optionally saving the retrieved content to disk, but it provides no warning about privacy, trust, or data-handling risks. This can expose the agent or user to untrusted remote content, accidental ingestion of sensitive/internal documentation, or persistence of malicious or confidential data in local files and agent context.
The script's natural-language comments, log messages, errors, examples, and help text are predominantly in Chinese, with no option for users to select another language. This can violate a language/locale policy when tools are expected to respect user language preferences or provide opt-in localization.
This shell skill presents its description, usage examples, option help, and dependency error text in Chinese only. The policy allows locale constraints only when explicitly documented and justified or when the user is given a choice, neither of which is present here.
The script performs network requests to user-supplied or registry-derived URLs and fetches arbitrary remote content without enforcing an allowlist, scheme/host restrictions, or content validation. In an agent context, this can expose the runtime to SSRF-style access to internal services or cause ingestion of attacker-controlled prompt content into downstream LLM workflows.
log "尝试 $url"
local content
if content=$(curl -sfL --max-time 30 "$url" 2>/dev/null); then
if [[ -n "$content" && ${#content} -gt 100 ]]; then
echo "$content"
return 0
The JSON comment string at L002 is written only in Chinese ("项目名 → 文档配置"), which imposes a specific language in the skill artifact without any visible opt-in, alternative locale, or justification. This matches the language/locale policy concern for natural-language content in config files.
This code performs a filesystem write when --save is used, but there is no user-facing warning in the usage text or inline comments describing where data will be written and that fetched remote content will be saved locally. Although the operation is optional, it is still a file write and the only disclosure comes after the write completes.
No suspicious patterns detected.