T09 · Insecure Skill Coding Practices
- Location
scripts/convert.py:37- Finding
Unrestricted Remote Image Retrieval Enables Server-Side Request Forgery and Resource Exhaustion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Markdown converter, but it needs Review because it automatically fetches remote images and has unsafe temporary-file cleanup that can delete existing data.
Install only if you trust the Markdown inputs and the environment where conversion runs. Avoid converting untrusted Markdown with remote image links, do not point output at directories where .temp_images may contain important files, and prefer a sandboxed or offline environment until remote fetching and temporary-file handling are fixed.
scripts/convert.py:37Unrestricted Remote Image Retrieval Enables Server-Side Request Forgery and Resource Exhaustion
scripts/convert.py:232Fixed Temporary Directory Cleanup Can Delete Pre-Existing User Data
scripts/ai_analyzer.py:301Predictable Chart Temporary Files Permit Local Race and Symlink Attacks
scripts/convert.py:457Generated HTML Preserves Active Markup from Untrusted Markdown
package.json:11Unpinned and Incorrectly Declared Third-Party Dependencies Create Supply-Chain Risk
The skill is presented as a simple document converter, but the described behavior includes remote downloads and execution of local conversion components like Word COM or LibreOffice. This is dangerous because hidden network access and local application invocation materially expand the attack surface and can cause users or agents to run riskier operations than the declared purpose suggests.
The skill is presented as a simple document converter, but the described behavior includes remote downloads and execution of local conversion components like Word COM or LibreOffice. This is dangerous because hidden network access and local application invocation materially expand the attack surface and can cause users or agents to run riskier operations than the declared purpose suggests.
The skill is presented as a simple document converter, but the described behavior includes remote downloads and execution of local conversion components like Word COM or LibreOffice. This is dangerous because hidden network access and local application invocation materially expand the attack surface and can cause users or agents to run riskier operations than the declared purpose suggests.
manifest 将技能描述为 Markdown 文档转换器,但代码为生成 PDF 启动 Microsoft Word COM 自动化以及 LibreOffice headless 子进程。对外部应用和子进程的控制是高权限执行能力,不是 manifest 中明确声明的范围,即使其服务于 PDF 导出,也应被显式披露。
The script sends or processes full document content through AI analysis functionality without clearly informing the user that sensitive file contents may leave the local environment. In a document-processing skill, this is especially dangerous because users may convert confidential reports, contracts, or internal notes and reasonably expect local-only handling.
The README advertises support for network images but does not warn that document conversion may initiate outbound requests to third-party hosts. This can leak IP address, timing, user-agent/environment details, and may cause the tool to fetch untrusted remote content during a local conversion workflow where users may reasonably expect offline processing.
The dependency section states that image processing automatically downloads network images and embeds them, but it provides no warning about external network access, privacy leakage, or the risk of retrieving attacker-controlled content. In a conversion skill, users may supply untrusted Markdown, so automatic remote fetches can enable tracking and unexpected network activity during routine document generation.
The skill documentation describes capabilities that imply file reads/writes, network access, and shell execution, but it declares no explicit tool scope or permissions boundary. This is dangerous because an agent may invoke the skill with broader privileges than users expect, increasing the chance of unintended command execution, file modification, or network access.
The trigger description is broad enough that ordinary requests about documents or conversion could invoke the skill unexpectedly. In this context, accidental invocation matters because the skill may read local files, write outputs, invoke subprocesses, and potentially access the network, so overbroad triggering can lead to unintended sensitive operations.
The skill states that network images are automatically downloaded and embedded, but it does not clearly warn users that conversion may trigger outbound requests. This is dangerous because embedded remote image URLs can leak metadata, contact untrusted hosts, or fetch malicious content unexpectedly during what appears to be a local document conversion workflow.
The manifest describes a document conversion skill that applies templates and exports Markdown to Word/PDF/HTML. This file instead implements semantic analysis features such as document-type detection, topic extraction, image suggestion prompts, and table-data extraction, which are not described as part of the converter’s behavior and materially expand the skill’s scope.
This is a natural-language policy issue because the file presents its user-facing description entirely in Chinese and does not indicate that other languages are supported. The stated policy requires flagging language constraints when they are forced without user opt-in or clear justification.
The manifest promises Markdown conversion into styled Word/PDF/HTML documents, but this class creates new chart PNG files from extracted table data. Generating standalone visual assets is a distinct behavior from format conversion and is not disclosed in the stated skill purpose.
The skill is presented as a Markdown converter, but it also imports and exposes AI document analysis and chart generation capabilities. That mismatch increases the chance that sensitive document content is processed in ways users did not expect, especially if the analyzer uses external services or generates derivative artifacts.
The converter silently downloads remote images referenced in Markdown, despite the skill description not disclosing network access. This can leak the user's IP and environment to third parties, fetch untrusted content, and create local files unexpectedly during what appears to be an offline conversion task.
The script fetches remote images and writes them to disk without an explicit warning or consent flow. This creates privacy and trust issues, and in a document-conversion context it can surprise users with external network traffic and persistence of untrusted content on the local system.
Allowing Markdown content to trigger remote image retrieval extends the skill beyond simple local format conversion into network-capable content fetching. In this context, that is more dangerous because untrusted Markdown can cause outbound requests and local file writes during routine document processing.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if soffice:
output_dir = os.path.dirname(pdf_file)
result = subprocess.run([
soffice, "--headless", "--convert-to", "pdf",
"--outdir", output_dir, docx_file
], capture_output=True, timeout=60)
The natural-language strings in the module docstrings, argument descriptions, status messages, and errors are consistently Chinese-only. This imposes a specific language on users without any visible opt-in or alternative locale support, matching the language/locale policy violation criteria.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 运行转换
try:
result = subprocess.run(cmd, capture_output=True)
# 处理编码
try:
stderr_text = result.stderr.decode('utf-8') if result.stderr else ""
L008 说明该技能会将 Markdown 转换为 Word、PDF 和 HTML 文档,这意味着会在用户系统上生成新文件。文档虽说明了结果文件位置,但缺少显式的用户提醒,说明会创建输出文件并可能覆盖或占用目标目录。
The natural-language description is written only in Chinese, which can impose a specific language on users without offering a language choice or explaining a locale-specific scope. Under the policy, language constraints should be optional or clearly justified when they limit accessibility.
The manifest specifies markdown with a broad lower-bound version constraint rather than pinning or constraining to a known-safe release, so builds may resolve to a version affected by a known ReDoS advisory. In a Markdown-to-document conversion skill that processes user-supplied content, a vulnerable parser could allow crafted Markdown input to consume excessive CPU and cause denial of service.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
The HTML template forces lang="zh-CN" for all generated documents. This is a natural-language locale policy concern because the file does not provide a user opt-in or configurable language setting, and the tool appears to be a general Markdown converter rather than a clearly region-specific utility.
No suspicious patterns detected.