Back to skill

Security audit

SatsRail MCP — Bitcoin Lightning Payments for AI Agents

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-built for SatsRail Lightning payments, but it needs review because it can create real payment artifacts and runs an unpinned npm MCP server with a financial API key.

Review this before installing. Start with a test SatsRail key, pin or otherwise verify the MCP package version before running it, avoid broad live API keys, and require human confirmation before creating orders, invoices, or hosted checkout sessions.

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:38
Finding
Unpinned npm Package Executes with a Financial API Secret## Vulnerability Details **File Location**: `SKILL.md`, lines 38–46 **Vulnerability Type**: Unpinned third-party dependency with access to sensitive credentials **Risk Level**: Medium ### Vulnerable Code ```json { "mcpServers": { "satsrail": { "command": "npx", "args": ["-y", "satsrail-mcp"], "env": { "SATSRAIL_API_KEY": "sk_test_your_key_here" } } } } ``` ### Technical Analysis The configuration runs `npx -y satsrail-mcp` without specifying an exact package version or enforcing an integrity constraint. Consequently, npm resolves, downloads, and executes whichever package version is current at execution time. The `-y` option automatically accepts installation prompts, reducing the opportunity for users to review what will be installed. The launched package receives `SATSRAIL_API_KEY` in its process environment. The documentation explicitly allows test or live keys, so the exposed credential may authorize financial operations. This creates a supply-chain trust boundary: a compromised package release, publisher account, registry response, or transitive dependency could execute arbitrary code with access to the key. The reviewed project does not establish that the current `satsrail-mcp` package is malicious. The vulnerability is the unsafe, mutable dependency execution pattern combined with credential exposure. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry resolution path, or a dependency used by `satsrail-mcp`. 2. The attacker publishes or causes resolution to a malicious package version. 3. A user starts the configured MCP server. 4. `npx -y` automatically retrieves and executes the attacker-controlled version without an exact version or integrity check. 5. The malicious process reads `SATSRAIL_API_KEY` from its environment. 6. The attacker exfiltrates the credential or performs API operations within the key's permissions. ### Impact Assessment Success ...[truncated 550 chars]
Remediation
## Remediation Suggestions - Pin `satsrail-mcp` to an exact, reviewed version rather than resolving the latest release dynamically. - Install the dependency through a committed lockfile and verify registry integrity metadata during installation. - Avoid automatic `npx -y` execution for software that receives sensitive credentials. Prefer a controlled, reviewed installation process. - Verify the npm package publisher, repository provenance, signatures or attestations where available, and the dependency tree before deployment. - Use a test key during initial configuration and validation. - Apply least privilege to production API keys, restricting them to only the operations required by the agent. - Run the MCP server in an isolated environment with minimal filesystem, network, and operating-system permissions. - Rotate the API key immediately if package or dependency integrity is uncertain, or if an untrusted version may have been executed. - Monitor API activity for unexpected orders, invoices, checkout sessions, wallet access, or other anomalous operations.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (1)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill enables creating orders, generating invoices, and hosted checkout sessions tied to real Lightning payments, but the introductory description does not warn users that these actions can initiate financial transactions. In an agent setting, users may treat natural-language requests as low-risk and unintentionally trigger billable or customer-facing payment flows without clear consent boundaries.

Static analysis

No suspicious patterns detected.