Back to skill

Security audit

read wechat article

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but its main article-fetching code disables HTTPS certificate verification, which makes fetched content easier to intercept or tamper with.

Review this before installing or using it in trusted workflows. The skill should restore normal HTTPS certificate verification and validate redirects before users rely on returned article content. Treat fetched article text as untrusted, avoid bulk scraping, and prefer pinned dependency versions for reproducible installs.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
read_wechat_article.py:83
Finding
TLS Certificate Verification Disabled for Article Retrieval## Vulnerability Details **File Location**: `read_wechat_article.py`, lines 83-89 **Vulnerability Type**: Improper certificate validation **Risk Level**: High ### Vulnerable Code ```python response = session.get( cleaned_url, timeout=TIMEOUT, allow_redirects=True, verify=False # Disable SSL verification to address issues in some environments ) ``` ### Technical Analysis The article-fetching request explicitly sets `verify=False`, disabling TLS certificate validation for every outbound request made through this code path. As a result, the client does not verify that the remote certificate is valid or belongs to the intended WeChat domain. Because `allow_redirects=True` is also enabled, the request may follow redirects while retaining the same lack of certificate validation. The implementation does not validate the scheme and hostname of the final response URL. An attacker with a network-level interception capability—such as control over a hostile Wi-Fi access point, compromised proxy, manipulated local network, or similar man-in-the-middle position—could impersonate the destination and provide arbitrary HTML. The forged response would then be parsed as a genuine article. ### Attack Path 1. A user invokes the Skill with a syntactically valid `https://mp.weixin.qq.com/s/...` URL. 2. The Skill validates only the initial URL prefix and calls `fetch_wechat_html`. 3. The attacker intercepts the HTTPS connection or manipulates its redirect path. 4. The attacker presents an invalid or attacker-controlled TLS certificate. 5. The client accepts the certificate because `verify=False`. 6. The attacker returns forged article HTML containing manipulated text, metadata, links, or image URLs. 7. The Skill parses the response and returns the attacker-controlled material as trusted article data. 8. If a downstream AI Agent interprets retrieved article text as instructions rather than untrusted content, the forged content could also facilitate indirect pro ...[truncated 841 chars]
Remediation
## Remediation Suggestions 1. Restore certificate verification by removing the `verify` argument or setting it explicitly to `True`: ```python response = session.get( cleaned_url, timeout=TIMEOUT, allow_redirects=False ) ``` 2. Validate redirects manually before following them. Require: - The `https` scheme. - The exact hostname `mp.weixin.qq.com`. - An expected article path beginning with `/s/`. - A bounded number of redirects. 3. Do not introduce an insecure fallback that retries with certificate verification disabled. If validation fails, return an explicit network or certificate error. 4. Use the operating system or `certifi` CA trust store. If a controlled enterprise environment requires a private CA, allow an explicitly configured CA bundle rather than disabling verification globally. 5. Add tests that mock: - Certificate validation failures. - Redirects to unexpected hosts. - Redirects to non-HTTPS URLs. - Excessive redirect chains. 6. Treat fetched article text as untrusted data in downstream Agent workflows. Keep it clearly separated from system or developer instructions and do not execute commands or follow instructions embedded in article content.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (16)

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The changelog states '多语言支持:中文界面和文档', but this describes only a Chinese interface and documentation rather than offering multiple language choices. Per the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless clearly justified.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The guide explicitly recommends adding bulk URL processing and bulk image downloading, but elsewhere only states high-level compliance rules without giving concrete risk warnings, guardrails, or implementation constraints for those features. In a scraping-related skill, this can normalize abusive collection behavior, increase platform-policy violations, and lead downstream implementers to build high-volume scraping capabilities without safeguards.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The README includes an `Accept-Language` header fixed to `zh-CN,zh...`, which imposes a specific locale preference. The policy allows locale constraints only when the skill offers user choice or clearly documents a justified region-specific constraint; this file does neither for general usage.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The documented default request headers set `Accept-Language` to prefer `zh-CN`, which is a natural-language locale constraint. The skill does not indicate that users can choose another locale or that the Chinese locale requirement is mandatory for a region-specific compliance reason.

Missing User Warnings

Medium
Confidence
99% confidence
Finding
The network request disables TLS certificate verification with verify=False, which allows a man-in-the-middle attacker to intercept or modify HTTPS traffic. In this skill's context, that means an attacker could supply tampered HTML that the parser will trust and return as article content, undermining integrity and confidentiality of fetched data.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
cleaned_url,
                timeout=TIMEOUT,
                allow_redirects=True,
                verify=False  # 关闭SSL验证,解决部分环境问题
            )
            response.raise_for_status()
Confidence
99% confidence
Finding
Using verify=False is an unsafe default because it silently disables authentication of the remote server for every request. This makes the skill especially risky because its core function is to fetch remote content; an attacker on the network path could spoof WeChat pages, inject misleading content, or capture request metadata.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The module docstring and metadata describe the skill entirely in Chinese and specifically as a WeChat public-account article reader, which imposes a language/locale expectation in the natural-language surface. The file does not offer any user opt-in or alternative language choice, and no justification for a language-only experience is stated in this file.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The `Accept-Language` header forces a Chinese-preferred locale order (`zh-CN, zh, ...`) for all requests. This is a natural-language locale constraint with no user opt-in or documented region-specific justification in the file.

Intent-Code Divergence

Low
Confidence
92% confidence
Finding
The module docstring and main skill function describe a 'read WeChat article' capability focused on fetching, cleaning, and outputting structured text. However, the command-line interface adds a side effect by persisting output to disk when --output is used, which goes beyond a purely read/transform behavior.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
beautifulsoup4>=4.12.0
markdownify>=0.11.6
Confidence
95% confidence
Finding
The dependency is specified with a lower bound only, so installations may resolve to different versions over time. This weakens reproducibility and supply-chain assurance because a future vulnerable or incompatible release could be installed without review.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding
Requests has multiple known advisories, and because the manifest does not pin a specific version, it is impossible to verify whether the installed release is affected. This ambiguity is dangerous because an environment may resolve to a vulnerable version, especially in reproducible builds or long-lived deployments.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
beautifulsoup4>=4.12.0
markdownify>=0.11.6
Confidence
95% confidence
Finding
The package is not pinned to an exact version, which means builds are not deterministic and may pull in newer releases unexpectedly. In a security context, this increases supply-chain risk and makes it harder to verify whether a safe version is being installed.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
beautifulsoup4>=4.12.0
markdownify>=0.11.6
Confidence
96% confidence
Finding
Using a non-pinned version range for markdownify allows dependency resolution to drift over time. That creates uncertainty about which code is actually deployed and can expose consumers to newly introduced vulnerable releases.

Unverifiable Dependency: markdownify has 2 known advisory(ies) (CVE-2025-46656 (markdownify allows large headline prefixes such as <h9999999>, which causes memo); CVE-2025-46656 (markdownify allows large headline prefixes such as <h9999999>, which causes memo)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
86% confidence
Finding
Markdownify has known advisories, and the lack of an exact version pin prevents verification that installations avoid affected releases. This is particularly risky when processing untrusted HTML or content, because vulnerable parser or conversion behavior may be reachable through normal skill usage.

Natural-Language Policy Violations

Low
Confidence
87% confidence
Finding
The package description is presented only in Chinese ("微信公众号文章阅读工具"), which can impose a specific language on users without any visible opt-in or explanation of locale scope. Under the policy for natural-language violations, forcing a specific language without user choice can be a concern even in metadata.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
This manifest uses Chinese-only natural-language descriptions, parameter documentation, examples, and compliance notes, but does not state that the skill is intended only for Chinese-speaking users or offer any language/locale choice. Under the language/locale policy, forcing a single language without opt-in can be a natural-language policy concern.

Static analysis

No suspicious patterns detected.