Back to skill

Security audit

openclaw-ecommerce

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a local ecommerce CLI, but it ships under-scoped network scraping and unsafe backup/restore code that should be reviewed before installation.

Install only after reviewing the network and data-loss risks. Run it in an environment where product URL fetching cannot reach internal or metadata services, do not let untrusted content add product URLs, and avoid using the backup/restore module until restore is transactional and validated. Expect product, order, tracking, alert, and price data to persist locally, with aggregate ecommerce state written to interchange Markdown files.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
src/price-check.js:27
Finding

Arbitrary Product URL Fetching Enables Server-Side Request Forgery

Content
View full analysis

Vulnerability Details

File Location: src/price-check.js:27-31
Related Input Flow: src/cli.js:18-24, src/products.js:13-18
Vulnerability Type: Server-Side Request Forgery (SSRF)
Risk Level: High

Vulnerable code in src/price-check.js:

js
try {
  const html = await cb.call(async () => {
    const response = await fetch(url);
    if (!response.ok) throw new Error(`HTTP ${response.status}`);
    return await response.text();
  });

User-controlled URL entry in src/cli.js:

js
watch.command('add')
  .description('Add product to watchlist')
  .argument('<name>', 'Product name')
  .requiredOption('--url <url>', 'Product URL')
  .option('--target <price>', 'Target price')
  .action((name, opts) => {
    const id = addProduct(db, { name, url: opts.url, target_price: opts.target ? parseFloat(opts.target) : null });
    console.log(`Added product ${id}`);
  });

URL storage in src/products.js:

js
export function addProduct(db, opts) {
  if (!opts.name) throw new Error('Product name is required');
  if (!opts.url) throw new Error('Product URL is required');
  const id = uuidv4();
  db.prepare(`INSERT INTO products (id, name, url, source, target_price, currency) VALUES (?, ?, ?, ?, ?, ?)`)
    .run(id, opts.name, opts.url, opts.source || 'generic', opts.target_price || null, opts.currency || 'USD');
  return id;
}

Technical Analysis

The CLI accepts an arbitrary product URL and stores it without validating its scheme, hostname, resolved IP address, or destination network. The price-checking implementation later supplies this URL directly to the built-in fetch() function.

Consequently, a user who can add products and invoke or influence price checking can direct the process to send requests to destinations reachable from the Agent host, including:

  • Loopback services such as 127.0.0.1 or ::1
  • RFC1918 private networks
  • Link-local addresses
  • Cloud instance metadata endpoints
  • Internal administ ...[truncated 2782 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse all submitted URLs with the standard URL class and reject malformed inputs.
  2. Permit only explicitly required protocols, preferably https:. Reject file:, data:, ftp:, and other schemes.
  3. Resolve the hostname before connecting and reject every address in loopback, private, link-local, multicast, unspecified, carrier-grade NAT, documentation, and other reserved IPv4 and IPv6 ranges.
  4. Protect against DNS rebinding by binding the validated resolution to the actual connection or rechecking the connected peer address.
  5. Disable automatic redirects where possible. Otherwise, validate the scheme, hostname, and resolved address at every redirect hop and enforce a low redirect limit.
  6. Prefer an explicit allowlist of approved merchant domains if the operational model permits it.
  7. Add an abort-based request timeout and enforce a conservative maximum response size while streaming the body.
  8. Run the scraper in a network-restricted environment that cannot reach cloud metadata, loopback services, or internal management networks.
  9. Add tests covering loopback, RFC1918, link-local, IPv6, alternative numeric IP representations, DNS rebinding scenarios, and redirects to prohibited destinations.
  10. Repair the existing module errors without bypassing these controls, including the invalid in-function import, missing price-history.js, incompatible database import, and undefined product reference.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This mismatch indicates the skill performs sensitive actions—network fetching of arbitrary product URLs and local persistence—without clearly declaring those capabilities, while some advertised features may not actually exist. That combination is dangerous because users may trust the skill for one purpose while it silently collects, stores, or processes data in ways not transparently disclosed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This mismatch indicates the skill performs sensitive actions—network fetching of arbitrary product URLs and local persistence—without clearly declaring those capabilities, while some advertised features may not actually exist. That combination is dangerous because users may trust the skill for one purpose while it silently collects, stores, or processes data in ways not transparently disclosed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This mismatch indicates the skill performs sensitive actions—network fetching of arbitrary product URLs and local persistence—without clearly declaring those capabilities, while some advertised features may not actually exist. That combination is dangerous because users may trust the skill for one purpose while it silently collects, stores, or processes data in ways not transparently disclosed.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The restore flow deletes all rows from multiple tables before verifying the imported content is complete, valid, and safely restorable, creating a high risk of irreversible data loss if the backup file is malformed, incomplete, or attacker-supplied. In the skill context, this is more dangerous because the data includes orders, alerts, and monitoring history that are central to ecommerce operations, so a bad restore can disrupt business logic and auditability.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and appears to require network access for scraping product URLs, but it does not declare any tool scope or permissions. In an agent environment, undeclared capabilities weaken user consent and policy enforcement, making it easier for the skill to fetch remote content unexpectedly or beyond what users anticipate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill handles potentially sensitive commercial data such as orders and tracking numbers, stores it locally, and publishes some data into interchange markdown files consumable by other agents, but the description lacks a clear warning. This increases the risk of accidental disclosure, over-sharing between agents, and unsafe assumptions about privacy or data locality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The module reads from and writes to arbitrary filesystem paths for JSON backup portability, which is not an obvious requirement of price monitoring, order tracking, alerts, or margin calculation. This introduces a general data export/import capability unrelated to the core business functions described in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The backup function writes a full JSON export of products, orders, alerts, and tracking-related data directly to a caller-controlled filesystem path with no access control, path restriction, permission hardening, or encryption. If an untrusted caller can influence outputPath or invoke this function, sensitive operational data can be silently persisted to an unintended location and exposed to other local users or processes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes price monitoring, order tracking, alerts, and margin analysis, which implies operational ecommerce data handling but not a destructive backup-restore capability. This function accepts an arbitrary backup file, deletes all existing tables, and repopulates the database, which is materially broader than the stated skill purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes price monitoring, order tracking, alerts, and margin calculation, but this file also provides a refresh command that generates 'interchange files'. That export/synchronization capability is not mentioned in the stated skill purpose, so the implemented behavior exceeds the described scope at the manifest level.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The migration transaction executes arbitrary SQL from migration files, which may create, alter, or delete schema/data, but the code provides no confirmation prompt, logging, or explicit warning about this potentially irreversible operation. The module comment mentions migrations, but it does not disclose that pending SQL files will be executed automatically against the database.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The inline documentation describes addToHistory and checkAlerts as stubs or code that "will be" elsewhere later, implying placeholder or non-operative logic. In reality, addToHistory inserts into the price_history table and checkAlerts calls createAlert, so the comments materially understate real side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file documents that running ecom refresh generates .md files with current data, which is a file-writing operation affecting the local workspace. The description explains what the command does, but it does not include a user-facing warning or caution about overwriting/regenerating files or where outputs are written.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: uuid==10.0.0 — 1 advisory(ies): CVE-2026-41907 (uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided)

Low
Category
Supply Chain
Confidence
89% confidence
Finding

The lockfile pins uuid to 10.0.0, which matches the reported advisory for missing buffer bounds checks in certain v3/v5/v6 code paths when a caller supplies a buf argument. This is a real supply-chain vulnerability in the dependency, though its practical risk here appears limited because a package-lock.json alone does not show the application actually invoking the affected API pattern.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a caret range, which allows newer compatible versions to be installed over time. This creates supply-chain risk because builds may pull in unexpected dependency changes or newly introduced malicious/vulnerable releases, reducing reproducibility.

Content

Scanner excerpt · package.json (reported line 18)May include surrounding context.

json
"start": "node src/cli.js"
  },
  "dependencies": {
    "better-sqlite3": "^10.0.1",
    "commander": "^12.1.0",
    "uuid": "^10.0.0"
  },

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The commander dependency is not pinned to an exact version, so future installs may resolve to different package contents within the allowed semver range. In an agent skill context, this increases software supply-chain exposure and can undermine reproducible, auditable deployments.

Content

Scanner excerpt · package.json (reported line 19)May include surrounding context.

json
},
  "dependencies": {
    "better-sqlite3": "^10.0.1",
    "commander": "^12.1.0",
    "uuid": "^10.0.0"
  },
  "devDependencies": {}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The uuid package is declared with a floating caret range, which permits automatic uptake of later releases in the major version line. Even when the current version is known, unpinned dependency resolution increases the chance of unintentionally importing a compromised or incompatible release.

Content

Scanner excerpt · package.json (reported line 20)May include surrounding context.

json
"dependencies": {
    "better-sqlite3": "^10.0.1",
    "commander": "^12.1.0",
    "uuid": "^10.0.0"
  },
  "devDependencies": {}
}

Known Vulnerable Dependency: uuid==10.0.0 — 1 advisory(ies): CVE-2026-41907 (uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided)

Low
Category
Supply Chain
Confidence
84% confidence
Finding

The package references uuid 10.0.0, which is flagged for a buffer bounds check issue in v3/v5/v6 when a buf argument is provided. If the skill code or a reachable code path uses those APIs with attacker-influenced buffer inputs, it could cause crashes or undefined behavior, though the package.json alone does not prove exploitability in this skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code creates directories, opens a SQLite database file, sets pragmas, and runs migrations, which can modify files on disk. Although the module docstring describes database initialization and migrations, there is no user-facing warning, confirmation, or visible disclosure about these write operations in the code shown.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This function writes capabilities.md directly to disk, which is a file-modifying operation. The code does not include a confirmation prompt, visible logging, or nearby warning to inform the user that running this skill will create or replace a file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code writes a generated summary to disk using fs.writeFileSync, which can overwrite existing files under the interchange directory. Although the module comment says it generates interchange files, there is no confirmation prompt, log statement, or inline warning near this write operation to disclose the filesystem change to the user.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The comment says to assume persistence handling by CircuitBreaker, which reads like speculative or not-yet-real behavior. But lines L10-L15 explicitly configure the circuit breaker with a database instance and table, indicating intentional persistent state management rather than a hypothetical assumption.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The function fetches an externally supplied URL without any validation, allowlisting, or scheme restriction. In an e-commerce monitoring skill, this can enable server-side request forgery (SSRF), letting an attacker cause requests to internal services, cloud metadata endpoints, or other unintended network locations if they can influence the stored product URL.

Content

No source excerpt is available for this finding.