Back to skill

Security audit

Qwen Vision Rename

Security checks for vulnerabilities and agentic risk

Overview

The skill is related to image renaming, but it defaults to changing local filenames and can send private images and an API key to configurable remote endpoints without enough user control.

Review carefully before installing. Use only on folders you explicitly choose, prefer dry-run first, avoid private or sensitive images unless you accept remote vision processing, and do not configure custom base URLs or public media URL mode unless you trust the endpoint and understand that images may leave your machine or remain publicly reachable.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/vision_rename.py:397
Finding

Local images and API credentials can be transmitted to an arbitrary endpoint

Content
View full analysis
str: skill_env = get_openclaw_skill_env("qwen-vision-rename") return first_non_empty( cli_value, os.getenv("DASHSCOPE_BASE_URL", ""), os.getenv("OPENAI_BASE_URL", ""), skill_env.get("DASHSCOPE_BASE_URL", ""), DEFAULT_BASE_URL, ) ``` ```python def local_image_to_data_url(path_str: str) -> str: path = Path(path_str).expanduser().resolve() if not path.is_file(): raise FileNotFoundError(f"Image file not found: {path}") mime, _ = mimetypes.guess_type(str(path)) if not mime: mime = "image/png" encoded = base64.b64encode(path.read_bytes()).decode("ascii") return f"data:{mime};base64,{encoded}" ``` ```python def call_vision_api( *, base_url: str, api_key: str, model: str, image: str, prompt: str, timeout: int, ) -> str: endpoint = base_url.rstrip("/") + "/chat/completions" payload = { "model": model, "messages": [ { "role": "user", "content": [ {"type": "text", "text": prompt}, {"type": "image_url", "image_url": {"url": image}}, ], } ], "temperature": 0, } resp = requests.post( endpoint, headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", }, json=payload, timeout=timeout, ) ``` ### Technical Analysis Cloud-based image recognition legitimately requires sending image data to a vision service. Base64 encoding is being used as a transport representation rath ...[truncated 2111 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/vision_rename.py:215
Finding

Private images can persist in a publicly served outbound directory

Content
View full analysis
str: media_base_url = resolve_media_base_url() if not has_public_media_base_url(media_base_url): return "" source_path = path prepared_path = prepare_image_for_remote_fetch(path) if prepared_path is not None: source_path = prepared_path publish_root = resolve_media_outbound_dir() / "vision-input" publish_root.mkdir(parents=True, exist_ok=True) stat = source_path.stat() mtime_ns = getattr(stat, "st_mtime_ns", int(stat.st_mtime * 1000000000)) digest_src = "{}:{}:{}".format(source_path.resolve(), stat.st_size, mtime_ns) digest = hashlib.sha1(digest_src.encode("utf-8")).hexdigest()[:10] stamp = dt.datetime.now().strftime("%Y%m%d-%H%M%S") suffix = source_path.suffix.lower() or ".bin" target_name = "vision-{}-{}{}".format(stamp, digest, suffix) target_path = publish_root / target_name if not target_path.exists(): shutil.copy2(str(source_path), str(target_path)) return media_base_url.rstrip("/") + "/vision-input/" + target_name ``` ### Technical Analysis When URL image mode is active and a public media base URL is configured, the script copies the selected image into the `vision-input` subdirectory of the configured outbound media directory. It then constructs a public URL for that copy. Publishing the image may be necessary for an API that only supports remotely fetchable image URLs. The implementation, however, provides no deletion, expiration, access control, or lifecycle management for the published copy. Optimized copies created elsewhere in the same workflow are also cached without automatic cleanup. The generated name uses a timestamp and a ten-character SHA-1-derived value based on the local path and file metadata. This is not a s ...[truncated 1553 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:15
Finding

Skill instructions mandate unconfirmed bulk file renaming

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description says it is for batch renaming local images, but the documented behavior also includes single-image description, rollback handling, remote API use, and potentially auto-selecting directories without explicit user input. This mismatch is dangerous because users and orchestrators may authorize a seemingly narrow local rename skill while it actually performs broader actions, including transmitting image contents externally and modifying files by default.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to capture common requests like '整理图片' that may not mean 'rename local files by content using a remote vision service.' Over-broad activation can cause the agent to invoke a file-modifying workflow in situations where the user intended advice, organization suggestions, or non-destructive help, increasing the risk of unintended local changes and privacy-impacting uploads.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/vision_rename.py (reported line 312)May include surrounding context.

python
def resolve_dotenv_paths() -> List[Path]:
    candidates = [
        Path.cwd() / ".env",
        Path(__file__).resolve().parent.parent / ".env",
    ]
    dedup = []  # type: List[Path]

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/vision_rename.py (reported line 313)May include surrounding context.

python
def resolve_dotenv_paths() -> List[Path]:
    candidates = [
        Path.cwd() / ".env",
        Path(__file__).resolve().parent.parent / ".env",
    ]
    dedup = []  # type: List[Path]

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Batch rename mode can process many local images and, depending on configuration, either upload their contents directly or publish copies to a public URL for remote retrieval, all without explicit disclosure during execution. In batch mode this is more dangerous because the privacy exposure scales from a single file to an entire directory of personal images.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares capabilities that imply file reads/writes, environment access, and network use, but does not constrain them with an explicit tool scope or permissions model. In a skill that can rename local files and send image content to a remote vision API, missing scope increases the chance of overreach, unintended file modification, or data exposure beyond what the user expects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs default direct execution of file renaming unless the user explicitly asks for a preview, but does not pair that behavior with a prominent warning or confirmation step. For a local file-modifying skill, defaulting to immediate writes raises the chance of accidental data changes, user surprise, and operational mistakes, even if rollback exists.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill mandates use for loosely related requests and states that content-classification-style requests should still map to renaming first, even when the user may have asked for a different operation such as sorting or moving files. Ambiguous routing in a state-changing skill is risky because it biases the system toward destructive or privacy-sensitive actions without clearly bounded scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The default natural-language prompt explicitly instructs the model in Chinese and requires output such as titles in Chinese characters. This imposes a language/locale choice by default without offering the user an explicit opt-in or alternative locale selection.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code can copy local images into a publicly served outbound directory and return a public URL for remote model access, which contradicts the apparent 'local rename' user expectation. This creates an unintended confidentiality risk because private local photos may be exposed over the internet in addition to being sent to a third-party vision API.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The HTTP POST itself is not inherently malicious, but here it is the mechanism used to send local image content and authorization headers to an external endpoint. In the context of a nominally local file-renaming skill, this external transmission is security-relevant because it exposes private image data to a remote service and depends on trustworthy endpoint configuration.

Content

Scanner excerpt · scripts/vision_rename.py (reported line 413)May include surrounding context.

python
"temperature": 0,
    }

    resp = requests.post(
        endpoint,
        headers={
            "Authorization": f"Bearer {api_key}",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The describe flow transmits image content to a remote vision API after loading API credentials, but there is no explicit user-facing warning at the point of use that local image data leaves the machine. For a skill presented as image renaming/organization, this omission materially increases privacy risk and may violate user expectations around local-only handling.

Content

No source excerpt is available for this finding.

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
93% confidence
Finding

The dependency is range-pinned rather than fixed to a single known-safe version, so builds may resolve to different requests releases over time, including versions with known advisories. Because this skill appears to process local files but may still rely on network access or URL handling through requests, leaving the exact resolved version unverifiable creates a real supply-chain and patch-management risk.

Content

No source excerpt is available for this finding.

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
93% confidence
Finding

For Python 3.7+ the manifest allows any requests version >=2.31.0, which prevents determining from the manifest alone whether the installed version is patched against all applicable advisories. Unpinned upperless ranges reduce reproducibility and can silently introduce vulnerable or behavior-changing releases into the environment.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: Pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +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
96% confidence
Finding

Pillow<9 permits a broad set of old Pillow releases, many of which have published vulnerabilities including image parsing issues and resource-consumption flaws. In the context of an image-renaming skill that processes local pictures, this is more dangerous than average because Pillow is directly exposed to attacker-controlled image inputs, making denial of service or potentially worse parser exploitation more plausible.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The module docstring presents the available use cases as describing images, generating filename titles, and applying renames with a rollback file. However, the script also implements an active rollback mode that renames files back, which is a meaningful file-modification behavior omitted from the top-level documentation and therefore understates what the tool does.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The stated purpose is batch renaming local image files based on image content, but the script exposes a separate describe mode that analyzes a single image and prints metadata without renaming anything. That capability may be related, but it is not justified by or declared in the manifest's rename-only workflow.

Content

No source excerpt is available for this finding.