T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/publish_script.py:94- Finding
Arbitrary local files can be uploaded through Markdown image references
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it says, but its publishing path can upload unintended local files and can send credentials and unpublished content over insecure relay URLs.
Install only if you control and trust the relay, configure it with HTTPS, use a strong relay key, and review Markdown from untrusted sources before running --real. Be especially careful with image paths, because a crafted article can cause local readable files outside the article folder to be uploaded.
scripts/publish_script.py:94Arbitrary local files can be uploaded through Markdown image references
scripts/md2wechat.py:42Markdown conversion permits unsafe HTML and attribute injection
'
f'{_esc(codes[int(m.group(1))])}')
return re.sub(r'\x00(\d+)\x00', restore, text)
```
### Technical Analysis
Ordinary Markdown text is not HTML-escaped before it is inserted into generated HTML. Only fenced and inline code content is passed through `_esc()`. Consequently, raw HTML included in headings, paragraphs, lists, or block quotes can survive conversion.
Image alternative text and resolved image URLs are interpolated directly into quoted attributes. Markdown link destinations are likewise inserted directly into `href` without attribute escaping or scheme validation. This permits malformed attribute injection and unsafe schem
...[truncated 1511 chars]scripts/publish_script.py:48Relay URL validation permits plaintext transmission of credentials and unpublished content
The declared description presents the skill as an end-to-end WeChat draft publisher that sends markdown content and cover images to a public account draft box through a relay service. The supplied code chunk does something narrower and materially different: it only transforms markdown into WeChat-friendly HTML and extracts image references. The module docstring explicitly says image upload is handled elsewhere and that this module is only responsible for text-to-HTML conversion. There is no network access, no relay usage, no authentication/config handling, and no publishing logic. This is not just an internal helper detail if the declared purpose is the overall skill behavior; the actual code chunk lacks the core advertised capability.
Referenced artifact was not completely inspected
python scripts/publish_script.py --article X.md --cover Y.png --titles-md T.md
Referenced artifact was not completely inspected
python scripts/publish_script.py --article X.md --cover Y.png --titles-md T.md
Referenced artifact was not completely inspected
python scripts/publish_script.py --article X.md --cover Y.png --titles-md T.md
Referenced artifact was not completely inspected
python scripts/publish_script.py --article X.md --cover Y.png --titles-md T.md
The README explicitly instructs users to send article content, images, and an access key to a publicly reachable relay service, but it does not clearly warn about the confidentiality and trust implications of doing so. Because the relay is internet-accessible and receives both content and authentication material, users may unknowingly expose unpublished article data or misuse a weakly protected endpoint if the relay is compromised, misconfigured, or operated by an untrusted party.
The skill describes capabilities that involve reading environment variables, reading and writing local files, and making authenticated network requests, but it does not declare any tool scope or permission boundaries. In an agent ecosystem, this creates an authorization gap where the runtime or reviewer cannot clearly constrain what the skill is allowed to access, increasing the risk of unintended data exposure or unreviewed side effects.
The manifest describes this skill as a 公众号草稿发布器 that pushes Markdown and cover images into the WeChat draft box. This file also exposes deletion operations for existing drafts via --delete/--delete-batch and the /draft-delete relay endpoint, which is a distinct destructive capability not mentioned in the manifest description or trigger phrases.
The manifest explicitly says the skill is for publishing WeChat drafts and says it is not triggered for unrelated domains like email. The optional Feishu notification path adds outbound messaging behavior to a separate platform, which is not necessary to publish drafts and is not declared in the manifest scope.
The example values use Chinese-only placeholder text such as "你的服务名", "地域", and "你的 RELAY_API_KEY". This imposes a specific language on users without any opt-in or alternative, which matches the policy category for language/locale constraints.
The module docstring is entirely in Chinese and explicitly targets WeChat content conversion, which imposes a specific language/locale context in the skill's user-facing natural-language description. There is no indication that users can choose another language or that the locale restriction is optional.
The skill’s stated purpose is converting Markdown and publishing a WeChat draft through a relay. The append_covered functionality records owner/repo tracking entries in a local markdown file, which appears to support some external workflow and is not an obvious requirement of draft publishing.
No suspicious patterns detected.