Back to skill

Security audit

PicList Upload

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the described Markdown image upload task, but its default file deletion and weak path limits create real data-loss and unintended-upload risks.

Install only if you understand that successful uploads delete local images by default. Use --dry-run first, use --keep-local unless deletion is intentional, process only trusted Markdown, avoid broad directories, and configure PicList to listen on 127.0.0.1 rather than 0.0.0.0.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/process.sh:169
Finding

Untrusted Markdown Paths Can Upload and Delete Arbitrary User-Readable Files

Content
View full analysis
/dev/null && pwd)/$(basename "$full_path") 2>/dev/null || true # Check if file exists if [ ! -f "$full_path" ]; then echo " ⚠️ File not found: $image_path" >&2 : $((fail_count++)) continue fi ``` ```bash # Upload image echo " Uploading: $image_path..." local new_url new_url=$(upload_image "$full_path") if [ -n "$new_url" ]; then # Replace all occurrences in content content="${content//"$match"/![${alt_text}](${new_url})}" : $((upload_count++)) # Track for deletion (use full_path as key) uploaded_files["$full_path"]=1 # Delete local file immediately after successful upload delete_local_image "$full_path" ``` The deletion function used by this path is: ```bash delete_local_image() { local image_path="$1" if [ "$KEEP_LOCAL" = true ]; then return 0 fi if [ -f "$image_path" ]; then local dir_path dir_path="$(dirname "$image_path")" rm -f "$image_path" echo " 🗑️ Deleted: $image_path" deleted_dirs["$dir_path"]=1 fi } ``` ### Technical Analysis The script treats every non-HTTP Markdown image target as a local file path. It canonicalizes the target but does not verify that the resulting path remains inside the Markdown directory or another explicitly authorized upload root. Consequently, path traversal components such as `../` are accepted. Absolute-path-like and symlink-assisted references may also escape the intended content directory, depending on how the path is represented and resolved. The documented image-extension list is not enforced, and neither the file extension nor the file's MIME signature ...[truncated 1559 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/process.sh:194
Finding

Local Images Are Deleted Even When the Markdown File Is Not Updated

Content
View full analysis
"$temp_file" mv "$temp_file" "$md_file" echo " ✏️ File updated: $md_file" else echo "$content" fi ``` The documented command semantics confirm that `--in-place` is optional and that local deletion is the default behavior: ```markdown **默认行为是上传成功后删除本地图片。** 只有当用户明确要求保留时,才可添加 `--keep-local`。不得擅自保留本地图片。 ``` ```markdown | `--in-place` | 直接修改原文件(必须指定,否则仅输出到终端) | ``` ### Technical Analysis Upload, Markdown replacement, and local deletion are not implemented as a transaction. Deletion occurs immediately after each successful upload, before the script determines whether the modified Markdown content will be persisted. When `--in-place` is omitted, the modified content is printed to standard output only. The original Markdown file remains unchanged, but its referenced local images have already been deleted. The document is therefore left with stale paths to nonexistent files. A similar consistency risk exists if a later write or rename operation fails after one or more images have already been removed. There is no rollback mechanism and no requirement that the Markdow ...[truncated 1149 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/setup.md:49
Finding

Setup Instructions Expose the PicList HTTP Service on All Network Interfaces

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/process.sh:123
Finding

Predictable Temporary File Allows Symlink-Based File Overwrite

Content
View full analysis
"$temp_file" mv "$temp_file" "$md_file" echo " ✏️ File updated: $md_file" ``` ### Technical Analysis The script constructs a deterministic temporary path by appending `.tmp` to the Markdown filename. It then opens that path through ordinary shell redirection without exclusive creation, ownership validation, or a symlink check. If another local user or process can create files in the Markdown file's directory, it can pre-create the predictable path as a symbolic link to another file writable by the victim. The `>` redirection follows the symbolic link and truncates or overwrites its target before `mv` is executed. The subsequent `mv` does not prevent the initial overwrite. The script also lacks a cleanup trap for interrupted execution and does not explicitly establish restrictive temporary-file permissions. ### Attack Path 1. The attacker identifies a Markdown file that the victim will process with `--in-place`. 2. The attacker has write access to that Markdown file's directory, such as a shared workspace or permissive temporary directory. 3. The attacker creates `.tmp` as a symbolic link to another file writable by the victim. 4. The victim runs the script with `--in-place`. 5. Shell redirection follows the symlink and writes transformed Markdown content into the attacker's chosen target. 6. The target file is corrupted or replaced under the victim's permissions. ### Impact Assessment The attacker can overwrite files that are writable by the user running the skill. The vulnerability does not independently grant root privileges, but its scope may include shell configuration, application settings, source files, or other sensitive user ...[truncated 170 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The changelog states that local images are deleted by default after upload, which exceeds the skill’s described purpose of uploading and replacing Markdown image links. Destructive behavior beyond the manifest can surprise users, cause irreversible data loss, and create a mismatch that undermines informed consent and safe tool use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The changelog indicates that local images are deleted automatically after successful upload, but this markdown file does not present a strong warning about that destructive default. In the context of a file-processing skill, silent deletion materially increases the risk of accidental data loss, especially if uploads succeed but users expect local originals to remain.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes shell-based functionality (bash scripts/process.sh, plus curl/jq) but does not declare any explicit tool scope such as permissions or allowed-tools. This creates a least-privilege violation: an agent may execute shell commands with broader access than intended, including file modification and deletion, without an auditable capability boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide explicitly configures PicList's HTTP server to listen on 0.0.0.0, which exposes the upload service on all network interfaces rather than localhost only. In the context of a tool that accepts file uploads and may use stored cloud credentials, this increases the attack surface and can allow other hosts on the local network—or beyond, if firewall/NAT rules permit—to access the service without any warning or hardening guidance.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes processing Markdown files by uploading local images to a PicList HTTP server and replacing links. In addition to checking server availability, the code actively starts the PicList desktop app via open -a PicList, which is an execution capability not implied by the stated document-processing purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

All natural-language content in this file is Chinese, and there is no indication that the skill offers language choice or is intentionally limited to a Chinese-language audience. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file describes behavior that will automatically run open -a PicList.app when the port is not listening. Automatic application launch affects the user's system state, and this changelog entry does not include a warning or cautionary note about that behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This shell script emits multiple user-facing status and error messages in Chinese, including dry-run output and PicList startup guidance. That imposes a specific language on users without opt-in or an alternative locale selection, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.