Back to skill

Security audit

SQL Profiler

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only SQL query optimization skill with no embedded code or hidden runtime behavior, though its README uses an unpinned npx installer command.

Install from a trusted ClawHub/npm source, avoid running the install command with administrator privileges, and prefer a pinned or verified installer version if available. Treat pasted SQL and EXPLAIN output as data you choose to share with the agent, especially if queries include sensitive table or customer details.

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

T08 · Insecure Dependencies

Warning
Location
README.md:23
Finding

Unpinned Remote Package Execution During Installation

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 23–26
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Vulnerable Code

markdown
## Install

```bash
npx clawhub install sql-profiler
text

### Technical Analysis

The documented installation command invokes `npx` without pinning the `clawhub` package to a reviewed version or integrity digest. If the package is not already available locally, `npx` may retrieve it from the configured npm registry and execute it with the privileges of the invoking user.

Consequently, the code executed during installation can differ from the code that existed when this Skill was audited. The repository provides no lockfile, integrity metadata, registry restriction, or other mechanism for verifying the installer. The external `clawhub` package and any npm lifecycle behavior are also outside the reviewed artifact.

This is a supply-chain weakness rather than evidence that the current Skill contains malicious code. Exploitation depends on compromise, replacement, or unexpected modification of the remotely retrieved package.

### Attack Path

1. An attacker compromises the npm account, publication pipeline, registry path, or a transitive dependency associated with the `clawhub` package.
2. The attacker publishes a malicious or modified release under the package name used by the documentation.
3. A user follows the README and runs `npx clawhub install sql-profiler`.
4. Because no package version or integrity digest is specified, `npx` resolves and retrieves the package available through the configured registry.
5. The retrieved package executes with the user's local permissions.
6. Malicious installer code could access files and credentials available to that user, alter local configuration, or launch additional processes.

### Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the user performing the installation. The ac
...[truncated 810 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the installer to a specifically reviewed release:
    bash
    npx clawhub@<verified-version> install sql-profiler
    
  2. Verify the selected package version and its dependency tree before publishing the installation instructions.
  3. Document the expected npm registry and advise users not to install from untrusted registry mirrors.
  4. Where supported, verify the downloaded package against an expected integrity digest or signed provenance.
  5. Prefer a locked, reproducible installation workflow rather than resolving the newest package at execution time.
  6. Review new installer versions before updating the pinned version.
  7. Advise users to run installation without administrator or root privileges and in an environment that does not expose unnecessary credentials.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The README instructs users to run npx clawhub install sql-profiler without pinning a specific version, which allows whatever package version is current at execution time to be fetched and run. This creates a supply-chain risk: a compromised upstream package, malicious update, or typosquatted dependency could execute arbitrary code on the user's machine during installation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.