Back to skill

Security audit

Mockhero

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent MockHero integration for generating synthetic test data, with a disclosed optional local server command that users should run cautiously.

Install/use this as a MockHero connector, but prefer the remote MCP endpoint unless you need local stdio. If you run the local server, pin and review the npm package version, expose only `MOCKHERO_API_KEY` when needed, and do not send real production data for anonymization or masking.

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
SKILL.md:37
Finding

Unpinned Third-Party Package Execution via npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 37
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Complete Code Snippet:

markdown
**Local stdio MCP:** `npx @mockherodev/mcp-server` (env: `MOCKHERO_API_KEY` optional, `MOCKHERO_API_BASE` optional).

Technical Analysis

The skill recommends executing @mockherodev/mcp-server through npx without specifying an exact package version or integrity digest. Depending on the local npm and npx configuration, this command can retrieve the package from the configured registry and immediately execute its lifecycle or entry-point code.

Because the dependency is unpinned, the code executed by future users may differ from the code reviewed at audit time. Compromise of the publisher account, registry, package namespace, or a future package release could therefore turn this documented command into an arbitrary local code-execution path. The optional MOCKHERO_API_KEY environment variable also means the process may receive a service credential when one is configured.

Attack Path

  1. An attacker compromises the package publisher, release pipeline, registry account, or another relevant supply-chain component.
  2. The attacker publishes a malicious version under @mockherodev/mcp-server.
  3. A user follows the skill instruction and runs npx @mockherodev/mcp-server.
  4. npx resolves and downloads the unpinned package version from the configured registry.
  5. The malicious package executes with the invoking user's privileges.
  6. It can access resources available to that process, potentially including environment variables, local files, and network connectivity.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the user or agent running npx. The affected scope includes files readable or writable by that account, environment variables exposed to the process, and network ...[truncated 236 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the package to an exact, reviewed version, for example npx @mockherodev/mcp-server@X.Y.Z, rather than allowing automatic resolution of the latest release.
  • Maintain a lockfile with package integrity metadata where installation is managed as part of a project.
  • Verify package provenance, registry source, signatures or attestations, and integrity hashes before execution.
  • Disable or carefully review lifecycle scripts where operationally possible.
  • Run the MCP server under a dedicated, least-privileged account or within a sandbox or container with restricted filesystem and network access.
  • Expose only the minimum required environment variables. Do not pass unrelated credentials into the package process.
  • Prefer the documented HTTPS MCP endpoint when local package execution is unnecessary and the remote-service trust model is acceptable.
  • Establish a controlled update and review process before changing the approved package version.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (1)

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The skill instructs users to run npx @mockherodev/mcp-server without pinning an exact package version or integrity. That causes execution of whatever package version is current at install time, creating a supply-chain risk if a malicious or compromised update is published, and this is especially relevant because MCP servers execute locally and may have access to environment variables such as API keys.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.