T09 · Insecure Skill Coding Practices
- Location
scripts/wechat_fetch_lite.py:40- Finding
Unrestricted URL Fetching Enables Server-Side Request Forgery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to fetch WeChat articles as advertised, but it uses broad network, browser, file, and cookie capabilities with weak scoping and risky browser settings.
Install only if you are comfortable with a WeChat scraping tool that can fetch arbitrary URLs, write local files, download many images, store/reuse browser cookies, and run Chromium with weakened security settings. Prefer using the Lite mode on trusted mp.weixin.qq.com URLs, avoid opening generated HTML from untrusted pages, and run it in a contained environment with limited network and filesystem access.
scripts/wechat_fetch_lite.py:40Unrestricted URL Fetching Enables Server-Side Request Forgery
scripts/wechat_fetch_v3.py:35Remote Pages Execute in Chromium with Critical Security Boundaries Disabled
scripts/wechat_fetch_lite.py:244Unsanitized Remote Content Is Written to Executable HTML Files
Account: {result['author']}
Publication time: {result['publish_time']}
Original URL: {result['url']}
Fetch time: {result['fetch_time']}
""" ``` The Playwright implementation uses the same direct interpolation pattern: ```python def _to_html(self, result: Dict) -> str: """Convert to complete HTML""" return f""" {result['title']}Account: {result['author']}
Publication time: {result['publish_time']}
Original URL: {result['url']}
Fetch time: {result['fetch_time']}
""" ``` ### Technical Analysis The generated HTML directly incorporates remote metadata and article markup. The title, author, publication time, original URL, and `content_html` are not escaped or sanitized. An attacker-controlled page can therefore inject active content such as: - `README.md:8Dependencies and Browser Binaries Are Installed Without Version or Integrity Pinning
scripts/wechat_fetch_lite.py:145Unbounded Image Downloads Permit Memory and Disk Resource Exhaustion
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.
The skill documents capabilities that perform network access plus local file and image writes, but it declares no tool scope or permission boundaries. In an agent environment, that omission can allow broader-than-expected execution, reducing visibility and user consent for filesystem changes and bulk remote fetching.
This Python file includes the tool description, docstrings, CLI help text, and runtime status messages in Chinese, with no indication that users can opt into another language. That is a natural-language locale policy issue because it imposes a language preference on all users rather than offering a choice or documenting a region-specific need.
In no-login mode the script launches Chromium with '--disable-web-security' and '--disable-features=IsolateOrigins,site-per-process', which turns off major browser isolation protections while loading attacker-controlled remote pages. Because this tool intentionally visits arbitrary URLs and renders their JavaScript, a malicious page could gain broader cross-origin access or exploit weakened site isolation, increasing the blast radius beyond normal scraping risk.
The natural-language instructions, headings, and feature descriptions are presented only in Chinese, which effectively forces a specific language for users. The rule allows locale constraints when choice or justification is provided, but this README does not offer an alternative language or explain a required Chinese-only scope.
The markdown documents batch fetching with an output directory and elsewhere advertises automatic image downloads, which implies local file creation. Under the markdown variant of SQP-2, user-facing documentation should warn when behavior may affect user data or system state, but this README presents the operations as features without any cautionary note.
The documentation encourages batch downloading and local image/output generation without prominently warning that running the skill will create files and generate potentially large volumes of network traffic. In agent workflows this can lead to surprise filesystem modification, excessive downloads, or accidental misuse at scale.
The HTTP session hard-codes an Accept-Language header preferring zh-CN, zh ahead of English. This imposes a locale choice in the skill behavior without exposing a user option or documenting an opt-in, which matches the language/locale policy violation criteria.
This manifest describes capabilities broadly as a WeChat article scraping tool, but provides no explicit trigger phrases, activation conditions, or exclusion criteria. In a manifest file, that lack of specificity can make it unclear when the skill should be invoked versus when a general request about articles or WeChat should not map to this skill.
The primary natural-language description is written in Chinese and does not indicate that language selection is optional or that the skill is intentionally region-specific. That can create a language/locale policy issue if users are not given a choice or the locale constraint is not documented.
No suspicious patterns detected.