Back to skill

Security audit

Mistral Mcp Openclaw

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward community Mistral MCP setup guide, with a real but disclosed npm supply-chain risk users should review before installing.

Before installing, review or pin the mistral-mcp npm package version, avoid sudo/global installs in sensitive environments where possible, and provide a Mistral API key with only the access you are comfortable giving to this community MCP server.

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:42
Finding

Unpinned Global Installation of a Community npm Package

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 42–46
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Medium

Vulnerable Code

markdown
Install the MCP server package globally:

```bash
npm install -g mistral-mcp
text

The skill metadata also declares the same unpinned dependency at lines 15–19:

```yaml
install:
  - kind: node
    package: mistral-mcp
    bins:
      - mistral-mcp

Technical Analysis

The instructions install the latest available version of the community-maintained mistral-mcp package without specifying an exact version or verifying its integrity. Consequently, the code reviewed during the skill audit is not necessarily the code that npm will install later.

An npm package can execute lifecycle scripts during installation and exposes the mistral-mcp executable that OpenClaw subsequently launches. If a future release or the package publishing account is compromised, following these instructions could install and execute attacker-controlled code. Global installation increases exposure because the executable is placed in a globally accessible npm binary location and may replace or shadow an existing command.

This finding does not establish that the current package is malicious. It identifies an unsafe dependency-management pattern that makes the effective payload mutable after review.

Attack Path

  1. An attacker compromises the package publisher account, npm package, or upstream release process.
  2. The attacker publishes a malicious version under the existing mistral-mcp package name.
  3. A user follows the skill instructions and runs npm install -g mistral-mcp.
  4. npm resolves the unpinned request to the attacker-controlled release.
  5. Malicious lifecycle code may execute during installation with the privileges of the user running npm.
  6. The globally installed mistral-mcp executable is later launched ...[truncated 814 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to a reviewed exact version, for example:
    bash
    npm install -g mistral-mcp@0.3.0
    
    The selected version should match the version actually reviewed; the example must not be adopted without verification.
  • Record and verify the npm registry integrity digest for the approved package artifact before installation.
  • Prefer a project-local, lockfile-controlled installation over a global installation. Commit the lockfile and use npm ci to obtain reproducible dependency resolution.
  • Disable npm lifecycle scripts during installation where compatible:
    bash
    npm install --ignore-scripts --save-exact mistral-mcp@<reviewed-version>
    
  • Review the package contents, transitive dependencies, lifecycle scripts, repository provenance, and maintainer history before approving a version.
  • Run the MCP server as a dedicated, unprivileged account or inside a restricted container with minimal filesystem and network access.
  • Supply MISTRAL_API_KEY only to the required process, use a narrowly scoped credential where supported, and rotate it if dependency compromise is suspected.
  • Avoid sudo npm install -g; document that installation and execution must not use administrative privileges.
  • Add an explicit upgrade procedure requiring security review before changing the pinned 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