Back to skill

Security audit

showmethemoney-pro

Security checks for vulnerabilities and agentic risk

Overview

This skill is for a paid premium action, but it lets an unauthenticated local backend choose payment details without requiring a clear final user confirmation.

Review this skill carefully before installing. It is not clearly malicious, but it can initiate payment flows based on values returned by a local service; only use it if you trust the backend on port 8787 and your StablePay limits or approval prompts prevent unwanted charges.

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

Untrusted Local Backend Controls Payment Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14–29 and 59–65
Vulnerability Type: Unvalidated payment instructions from an unauthenticated local service
Risk Level: High

Vulnerable Code Snippet

markdown
1. Resolve the current buyer DID from `stablepay_runtime_status`.
2. Call the merchant backend premium endpoint:
   - `GET http://127.0.0.1:8787/execute?agent_did=<buyer_did>`
3. Treat the merchant backend as the source of truth.
4. If the backend returns `200`, return the protected result.
5. If the backend returns `402 Payment Required`:
   - Parse the x402 response from `accepts[0]`:
     - `skill_did` → from `accepts[0].extra.skillDid`
     - `price` → from `accepts[0].maxAmountRequired` (convert from minor units to decimal: divide by 1,000,000)
     - `currency` → from `accepts[0].extra.currency`
     - `facilitator_url` → from `accepts[0].extra.facilitatorUrl`
   - **NEVER** use any hardcoded or fallback values
   - call `stablepay_pay_via_gateway` with the extracted values
6. If payment succeeds, retry the same `/execute` request once.
markdown
## Payment rules

When payment is required:

1. Use `stablepay_pay_via_gateway`.
2. Use the requirement returned by the backend when present.
3. Respect local payment limits already configured in the StablePay plugin.
4. Never claim payment succeeded unless StablePay returns a successful result.
5. Retry the premium action only once after a successful payment.

Technical Analysis

The skill treats a plaintext HTTP service on 127.0.0.1:8787 as authoritative and passes payment parameters supplied by that service to stablepay_pay_via_gateway. The documented workflow does not require authentication of the local merchant service, verification of the merchant identity, an allowlist for skillDid or facilitatorUrl, validation of the expected currency and exact price, or explicit user confirmation immediately before payment.

Loopback addressing prevents direct remote ...[truncated 2076 chars]

Remediation
View remediation

Remediation Suggestions

  1. Authenticate the merchant backend using a cryptographically verified identity rather than trusting any process bound to a loopback port.
  2. Require signed x402 payment requirements and verify the signature against a pinned merchant public key or other trusted identity.
  3. Pin or allowlist the expected skillDid, currency, facilitator origin, merchant identity, and product identifier.
  4. Define an expected exact price or a narrowly bounded price policy; reject any requirement outside that policy even when it remains below global StablePay limits.
  5. Require explicit user confirmation immediately before payment, displaying the verified recipient, product, amount, currency, and facilitator.
  6. Permit only approved HTTPS facilitator URLs and reject plaintext, malformed, unexpected, or dynamically redirected destinations.
  7. Bind the payment proof to the intended merchant, buyer DID, endpoint, product, amount, currency, and a fresh nonce to prevent substitution and replay.
  8. Validate the complete 402 response schema, including field types, unit conversion, numeric bounds, and the presence of exactly one supported payment requirement.
  9. Fail closed if backend authentication or payment-requirement verification cannot be completed.
  10. Where practical, use an authenticated local transport such as a protected Unix-domain socket or mutual authentication in addition to application-level signature verification.
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)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow directs the agent to initiate a payment flow automatically after receiving a 402 response, but it does not require an explicit user-facing warning or confirmation immediately before payment. In a premium-purchase context, this creates a real risk of unintended or insufficiently informed charges, especially because the skill treats the backend as authoritative and proceeds directly into payment retry logic.

Content

No source excerpt is available for this finding.