Back to skill

Security audit

Fetch Wx Article

Security checks for vulnerabilities and agentic risk

Overview

This skill has a clear WeChat article-fetching purpose, but its script can fetch any user-supplied URL instead of enforcing the documented WeChat-only scope.

Review this before installing in any environment that can reach private services. Use it only in an isolated, low-privilege environment, pass only intended WeChat article URLs, and prefer adding URL allowlisting plus pinned dependency versions before routine use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_wx_article.py:11
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
str: from scrapling.fetchers import Fetcher, FetcherSession page = Fetcher.get(url) ``` ```python def main(): if len(sys.argv) < 2: print("Usage: python3 fetch_wx_article.py ") print("Example: python3 fetch_wx_article.py https://mp.weixin.qq.com/s/xxx") sys.exit(1) url = sys.argv[1] try: content = fetch_wx_article(url) ``` ### Technical Analysis The script accepts a user-controlled command-line argument and passes it directly to `Fetcher.get()` without validating its scheme, hostname, port, resolved IP address, or redirect destination. Although the Skill documentation states that the script is intended for `mp.weixin.qq.com` articles, the implementation does not enforce this restriction. An attacker can therefore submit an arbitrary URL, including URLs targeting: - Loopback services such as `127.0.0.1` or `localhost` - Private network addresses - Link-local services - Cloud instance metadata endpoints - Internal administrative interfaces - Attacker-controlled redirectors that redirect to restricted destinations Simple hostname validation would not be sufficient by itself because DNS rebinding, alternative IP representations, and redirects can bypass incomplete checks. ### Attack Path 1. An attacker provides a non-WeChat URL as the requested article URL. 2. The agent invokes the script with the attacker-controlled value. 3. The value is assigned directly from `sys.argv[1]` to `url`. 4. `fetch_wx_article()` passes the URL to `Fetcher.get()` without validation. 5. The request executes from the environment where the Skill is running. 6. If the destination is reachable, its response is converted to Markdown and printed to standard output ...[truncated 768 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Unpinned Third-Party Dependencies Create Supply-Chain Exposure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (4)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function accepts any user-provided URL and passes it directly to the network fetcher without validating that it is a WeChat article link. In an agent/tooling context, this can enable server-side request forgery behavior, unexpected access to internal services or local network resources, and use of the skill outside its declared purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill description and instructions are written entirely in Chinese and are explicitly scoped to fetching WeChat public-account articles, but there is no statement offering a language choice or clarifying that the skill is intended only for Chinese-language use. Under the policy, a locale or language constraint should be opt-in or clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language strings and documentation are entirely in Chinese, including the description and argument documentation, with no indication that this language choice is optional or region-specific. Under the language/locale policy, forcing a specific language without user opt-in can be a policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code performs an outbound HTTP fetch against a URL provided on the command line, which is a network operation involving user-supplied input. While the script's purpose suggests fetching article content, there is no explicit user-facing notice in code comments or runtime output that it will contact the remote site.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.