Back to skill

Security audit

Tolstoy MCP

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Tolstoy integration, but it gives an agent persistent access to publish, delete, and manage live commerce/social content without clear confirmation, scope, or revocation guidance.

Install only if you trust Tolstoy and intend to let OpenClaw act on the selected Tolstoy workspace. Treat publish, delete, store, social, ads, and analytics requests as sensitive; review outputs before sending anything live and know how to revoke the Tolstoy OAuth authorization if access is no longer needed.

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
PUBLISH.md:5
Finding
Unpinned Global Installation of the ClawHub Publishing CLI<![CDATA[ ## Vulnerability Details **File Location**: `PUBLISH.md`, line 5 **Vulnerability Type**: Unpinned third-party publishing dependency **Risk Level**: Medium ### Vulnerable Code ```markdown 1. **ClawHub CLI** — `npm install -g clawhub` ``` ### Technical Analysis The documented publishing workflow installs the mutable latest release of the `clawhub` npm package globally. It does not specify a reviewed version, lock an integrity hash, or require provenance verification. An npm installation can execute package lifecycle scripts with the privileges of the user running npm. In addition, the installed CLI is subsequently trusted to authenticate the publisher and assemble or publish a release. A compromised package release, npm maintainer account, or dependency in the CLI's transitive dependency graph could therefore introduce malicious code after this project has been reviewed. ### Attack Path 1. An attacker compromises the `clawhub` npm package, one of its dependencies, or an authorized publisher account. 2. The attacker publishes a malicious version under the same package name. 3. A project publisher follows the documented `npm install -g clawhub` command. 4. npm retrieves the current compromised release and may execute its lifecycle scripts. 5. The malicious package executes with the publisher's user privileges or acts maliciously when the installed CLI is invoked. 6. It may access files available to that user, steal publishing credentials, modify the release bundle, or publish attacker-controlled content. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the publisher account. The affected scope may include the publisher's local files, environment variables, npm or ClawHub authentication material, source repositories, and release artifacts. If the command is run with elevated privileges, the impact would extend to those elevated privileges. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Pin the CLI to a specific reviewed version, for example: ```bash npm install -g clawhub@0.7.0 ``` - Prefer a project-local development dependency governed by a committed lockfile instead of a global installation. - Use `npm ci` with a reviewed lockfile where the publishing environment permits it. - Verify npm package provenance, signatures, publisher identity, and expected integrity metadata before installation. - Run the publishing tool in an isolated, minimally privileged environment without unrelated credentials or sensitive files. - Establish a controlled dependency-update process in which version changes are reviewed and tested before use. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
PUBLISH.md:20
Finding
Predictable Shared Temporary Directory Used as the Publication Source<![CDATA[ ## Vulnerability Details **File Location**: `PUBLISH.md`, lines 20–34 **Vulnerability Type**: Unsafe temporary-directory handling **Risk Level**: Medium ### Vulnerable Code ```markdown ClawHub may fail if `.git` is present. Copy to a clean directory: ```bash rsync -av --exclude=.git --exclude=node_modules \ packages/clawhub-tolstoy-skill/ /tmp/tolstoy-mcp-skill/ ``` ### 3. Publish ```bash clawhub publish /tmp/tolstoy-mcp-skill \ --slug tolstoy-mcp \ --name "Tolstoy MCP" \ --version 1.0.0 \ --changelog "Initial release - connect OpenClaw to Tolstoy's video commerce platform" ``` ``` ### Technical Analysis The documented workflow uses the fixed shared path `/tmp/tolstoy-mcp-skill/` as both the synchronization destination and the directory passed to the publishing command. The shown procedure does not securely create a unique directory, verify its ownership or permissions, clear existing contents, or remove destination files absent from the source. Because `rsync` is invoked without `--delete`, pre-existing files that do not conflict with source files remain in the destination. If another local user can prepare or modify this directory before publication, malicious or stale files can survive synchronization and become part of the published skill bundle. The predictable path also creates opportunities for race conditions between bundle preparation and publication. The exploitability depends on local access and the destination directory's effective ownership and permissions. ### Attack Path 1. A local attacker predicts that the publisher will use `/tmp/tolstoy-mcp-skill/`. 2. Before the documented workflow runs, the attacker creates or gains write access to that directory and places an additional malicious file in it. 3. The publisher runs the documented `rsync` command. 4. Because the command does not use `--delete` or an explicit allowlist, the attacker's unrelated file remains in the destination. 5. The publisher runs `clawhub publis ...[truncated 874 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Create a unique temporary directory with restrictive permissions: ```bash BUNDLE_DIR="$(mktemp -d)" chmod 700 "$BUNDLE_DIR" trap 'rm -rf -- "$BUNDLE_DIR"' EXIT ``` - Verify that the generated directory is owned by the current publisher and is not a symbolic link. - Populate the directory from a strict allowlist of required release files rather than copying the entire project tree. - If `rsync` is retained, use deletion semantics in a freshly created directory: ```bash rsync -av --delete \ --exclude='.git' \ --exclude='node_modules' \ packages/clawhub-tolstoy-skill/ "$BUNDLE_DIR/" ``` - Inspect and record the final bundle manifest before publication. - Reject symbolic links, unexpected executable files, and files not present in the approved manifest. - Publish directly from the unique directory and remove it immediately afterward through an exit trap. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
rm -rf "$BUNDLE_DIR"
mkdir -p "$BUNDLE_DIR"
cp -r "$SKILL_DIR"/* "$BUNDLE_DIR"/
rm -rf "$BUNDLE_DIR/node_modules" 2>/dev/null || true

echo "Publishing to ClawHub..."
clawhub publish "$BUNDLE_DIR" \
Confidence
95% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Session Persistence

Medium
Category
Rogue Agent
Content
This skill configures OpenClaw to use Tolstoy's MCP (Model Context Protocol) server. Once installed and authenticated, you can use natural language to:

- **Create and manage widgets** — Player widgets, shopper widgets, publish to your store
- **Work with media** — Search your library, get assets, manage video content
- **Product catalog** — Search products, list catalog, get product details
- **AI Studio** — Generate images, animate images, text-to-video, edit videos
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill description says it can publish to Instagram, TikTok Shop, Shopify, and Meta Ads, which can affect user-owned external accounts and live storefronts. The README does not include any caution, confirmation expectation, or warning about the impact of these actions.

Session Persistence

Medium
Category
Rogue Agent
Content
---
name: tolstoy-mcp
description: Connect OpenClaw to Tolstoy's video commerce platform via MCP. Create widgets, manage media, generate AI videos, search products, and publish to Shopify/Instagram/TikTok. Use when the user wants to work with Tolstoy, create video widgets, manage e-commerce content, or integrate with Tolstoy's platform.
triggers: tolstoy, video commerce, shopper widget, product video, AI video, Shopify widget, Tolstoy platform, gotolstoy
---
Confidence
84% confidence
Finding
The skill states that the connection persists for future sessions after OAuth authorization, which implies ongoing access to a remote MCP server with content management and publishing privileges. Persistent authorization is not inherently unsafe, but without clear scoping, revocation, and user-awareness language, it increases the risk of later unintended use of previously granted capabilities.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger and description terms are broad enough that the skill may be invoked for loosely related e-commerce, video, or Shopify requests, not just explicit Tolstoy tasks. In a skill that can create, modify, and publish external content, over-broad activation increases the chance of unintended tool exposure and accidental destructive or externally visible actions.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill advertises publishing and content-modifying capabilities across third-party platforms such as Shopify, Instagram, and TikTok without clearly warning that these actions can make external, persistent changes. In this context, a user or agent could trigger real-world publication or modification of commerce assets without appreciating the scope or irreversibility of the action.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The description grants very broad natural-language authority to create, manage, generate, and publish content across connected platforms without clearly constraining when those actions should occur. In an MCP/integration skill tied to e-commerce accounts, this can cause unsafe overreach, unintended destructive actions, or unauthorized publishing if an agent interprets vague prompts too aggressively.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The manifest advertises publishing, content generation, and store-connected actions after OAuth authentication, but it does not warn that these operations can modify external accounts or push live content. In the context of Shopify, Instagram, TikTok Shop, and ad platforms, missing warnings and confirmation expectations materially increase the risk of accidental publication, reputational harm, and unwanted commercial changes.

Missing User Warnings

Low
Confidence
77% confidence
Finding
The description states the skill can query store and performance data, which may expose business-sensitive analytics information. There is no accompanying notice that the skill accesses account data via the connected Tolstoy workspace.

Static analysis

No suspicious patterns detected.