Back to skill

Security audit

Wechat Article Html

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Markdown-to-WeChat-HTML converter with expected local file output, but users should avoid converting untrusted Markdown without sanitizing the generated HTML.

Install only if you are comfortable with the skill generating local HTML files from your Markdown. Review or sanitize output before opening it in a browser or pasting it into systems if the source Markdown, image URLs, or embedded HTML came from someone else.

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

Warning
Location
SKILL.md:71
Finding

Unsanitized Markdown and HTML Content in Generated Output

Content
View full analysis

\u7b2c\u4e00\u884c\u4ee3\u7801

\u7b2c\u4e8c\u884c\u4ee3\u7801

``` ```html \u56fe\u7247\u8bf4\u660e ``` The workflow further requires the converter to preserve existing `
` code blocks as HTML and replace local image paths with CDN URLs, but it does not require sanitization, escaping, URL validation, or an HTML allowlist. ### Technical Analysis The Skill directs an agent to interpolate Markdown-derived content into HTML elements and preserve existing `
` blocks. No instruction requires HTML metacharacters such as `&`, `<`, `>`, `"`, and `'` to be escaped before untrusted text is inserted into generated markup. Consequently, content intended to be displayed as text or code may instead be interpreted as active HTML. For example, attacker-controlled Markdown could contain an image element with an event handler, a deceptive form, an iframe, or another browser-supported element. Preserving an existing `
` block without sanitization also allows embedded child elements and attributes to survive conversion. The image conversion rule introduces an additional injection surface because `sr ...[truncated 2259 chars]
Remediation
View remediation
` in text nodes. - Escape `&`, `<`, `>`, `"`, and `'` in attribute values. - Treat code-block contents strictly as text, even when they contain HTML-like syntax. 2. Do not preserve arbitrary existing `
` blocks. Parse and sanitize them using a strict allowlist containing only the elements and attributes required for the output format. 3. Remove all event-handler attributes, including attributes beginning with `on`, and reject active or embedding elements such as `script`, `iframe`, `object`, `embed`, `form`, and `meta`. 4. Validate image URLs before placing them into `src`: - Permit only `https` URLs. - Restrict hosts to explicitly approved CDN domains. - Reject `javascript:`, `data:`, `file:`, and other unapproved schemes. - Normalize and parse URLs with a URL parser rather than string matching. 5. Distinguish trusted converter-generated markup from user-controlled source content. Only markup generated from fixed templates should bypass sanitization. 6. Add adversarial conversion tests covering: - Closing-tag injection. - Quoted and unquoted attribute injection. - Event-handler attributes. - Script and iframe elements. - Malicious URL schemes. - HTML embedded in inline and fenced code. - Raw `
` elements containing unsafe descendants. 7. Sanitize the completed output as a final defense-in-depth step before writing the `*_for_paste.html` file. ]]>
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown describes that the workflow will output a *_for_paste.html file, which is a file-writing operation. However, the skill description does not warn the user about where the file will be written, whether an existing file may be overwritten, or that local files will be modified/generated.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.