Back to skill

Security audit

WrynAI Skill

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward WrynAI web crawling skill, with cautions around third-party data sharing, an unpinned SDK install, and a screenshot example that can overwrite a local file.

Install this only if you are comfortable using WrynAI as a third-party crawling provider. Prefer a virtual environment and a pinned SDK version, do not send private/internal URLs or sensitive page content unless approved, and change the screenshot example to use a chosen non-overwriting output path.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.MD:22
Finding

Unpinned Third-Party SDK Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.MD:22 and SKILL.MD:678
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

bash
pip install wrynai

The same unpinned installation command appears in both the prerequisite and OpenClaw integration instructions.

Technical Analysis

The skill instructs users to install wrynai without specifying an exact version or validating package integrity. Although the document later identifies the expected SDK as version 1.0.0, the installation command does not enforce that version.

Package resolution is therefore mutable: pip will install whichever release the configured package index currently considers appropriate. A compromised package release, compromised package index, or unexpected future version could introduce code that was not part of this audit. Python packages can execute code during installation or when imported.

The SDK is subsequently initialized with the WRYNAI_API_KEY, so a malicious dependency version could access that credential in addition to the files, network resources, and other capabilities available to the invoking user.

Attack Path

  1. An attacker compromises the package distribution account, package index, or a future dependency release.
  2. The attacker publishes a modified version under the package name resolved by pip install wrynai.
  3. A user follows the skill instructions without a lock file, version constraint, or integrity hashes.
  4. Pip retrieves and installs the attacker-controlled release.
  5. Malicious code runs during installation or when wrynai is imported.
  6. The code operates with the invoking user's privileges and may access the API key supplied to the SDK, local user-accessible data, and network resources.

Impact Assessment

Successful exploitation could allow arbitrary Python code execution with the privileges of the user installing or running the skill. The ...[truncated 281 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a reviewed version:
    bash
    python -m pip install "wrynai==1.0.0"
    
  2. Prefer a locked requirements file containing cryptographic hashes:
    text
    wrynai==1.0.0 --hash=sha256:REPLACE_WITH_VERIFIED_HASH
    
    Install it using:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Verify package hashes against an independently trusted release source before documenting them.
  4. Install the dependency inside an isolated virtual environment rather than a system Python environment.
  5. Use a trusted, explicitly configured package index and review transitive dependencies.
  6. Keep the documented SDK version and enforced installation version synchronized.
  7. Apply the corrected command to both occurrences in SKILL.MD.

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.MD:608
Finding

Predictable Screenshot Path Permits File Clobbering

Content
View full analysis

Vulnerability Details

File Location: SKILL.MD:608-614
Vulnerability Type: Unsafe predictable output file
Risk Level: Low

Vulnerable Code

python
# Decode and save
image_data = result.screenshot
if "," in image_data:
    image_data = image_data.split(",")[1]

filename = "screenshot.png"
with open(filename, "wb") as f:
    f.write(base64.b64decode(image_data))

Technical Analysis

The screenshot example always writes to screenshot.png in the process's current working directory. Opening the file with mode "wb" truncates an existing file. The operation also follows symbolic links on platforms where they are supported.

Because the filename is predictable and no checks are performed for prior existence, file type, or symbolic links, another local actor able to modify the working directory can prepare the path before the function runs. The write may then overwrite an existing file or be redirected through a symbolic link to another path writable by the invoking user.

The decoded content is treated as image data and is not executed, so the issue is local file clobbering rather than payload execution.

Attack Path

  1. An attacker obtains write access to the directory from which the screenshot example will run.
  2. The attacker creates screenshot.png as a symbolic link to another file writable by the victim, or relies on the fixed filename colliding with an existing file.
  3. The victim invokes capture_page_screenshot.
  4. open(filename, "wb") follows the prepared link or opens the existing file and truncates it.
  5. The function writes decoded screenshot bytes over the selected target.

Impact Assessment

Exploitation can corrupt or replace files writable by the invoking user. It does not independently grant additional privileges: the process remains constrained by the caller's filesystem permissions. The practical scope depends on the working directory and the privileges u ...[truncated 124 chars]

Remediation
View remediation

Remediation Suggestions

  1. Accept an explicit output path from the caller and validate that it is inside an approved output directory.
  2. Refuse to overwrite existing files unless the caller explicitly requests replacement.
  3. Use exclusive creation to prevent silent clobbering:
    python
    from pathlib import Path
    
    output_path = Path("screenshot.png")
    with output_path.open("xb") as f:
        f.write(base64.b64decode(image_data, validate=True))
    
  4. For temporary screenshots, use tempfile.NamedTemporaryFile or tempfile.mkstemp to create a unique file atomically.
  5. Where available, reject symbolic links and use no-follow semantics when opening the destination.
  6. Avoid running the screenshot routine with elevated privileges or from directories writable by untrusted users.
  7. Validate Base64 input and impose a maximum decoded size before writing to limit malformed-data and resource-exhaustion risks.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is built around sending user-supplied URLs, search queries, and retrieved page content to the external WrynAI service, but it does not clearly warn users about third-party data disclosure. In an agent setting, this can expose sensitive research topics, internal URLs, or proprietary content to an external provider without informed consent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The screenshot helper is documented as capturing a screenshot, but it also decodes attacker-controlled response data and writes it to a fixed local filename. That mismatch can cause unintended filesystem side effects, including silent overwrite of an existing file, especially when this code is copied into automation without review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The screenshot example writes output to a hard-coded local filename without explicitly warning that running it will create or overwrite a file on disk. In practice, this can lead to unintended file modification in shared workspaces or automated environments where users assume the example is read-only or API-only.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.