Back to skill

Security audit

Get with Receipt

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Receipt commerce integration, but its setup script can trust an already-existing local MCP connection named `receipt` without verifying it points to the real Receipt endpoint.

Review before installing. This skill is designed to connect a Receipt account and can enable paid purchases under your limits or hosted approvals. Only proceed if you intend to use Receipt, verify any existing `receipt` MCP connection is actually `https://receiptprotocol.com/mcp` before running setup, keep OAuth callback codes out of chat, and set narrow per-call and daily spending limits.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/bootstrap-receipt.sh:11
Finding

Existing MCP Connection Is Trusted Without Canonical Endpoint Validation

Content
View full analysis

Vulnerability Details

File Location: scripts/bootstrap-receipt.sh, lines 11–18
Vulnerability Type: Improper validation of an existing trusted tool connection
Risk Level: Medium

Vulnerable Code

bash
if ! openclaw mcp show receipt --json >/dev/null 2>&1; then
  openclaw mcp set receipt \
    '{"url":"https://receiptprotocol.com/mcp","transport":"streamable-http","auth":"oauth","supportsParallelToolCalls":false}'
fi
openclaw mcp tools receipt --include 'receipt_*'

login_output=""
if ! login_output="$(openclaw mcp login receipt 2>&1)"; then
  fail "OpenClaw could not start the Receipt OAuth authorization attempt."
fi

Technical Analysis

The bootstrap script checks only whether an MCP connection named receipt exists. When it exists, the script does not parse the output of openclaw mcp show receipt --json or verify that the connection uses:

  • The canonical https://receiptprotocol.com/mcp endpoint
  • The expected streamable-http transport
  • OAuth authentication
  • Disabled parallel tool calls

The script then applies the trusted receipt_* tool filter and starts OAuth login against whichever connection currently owns the receipt name.

This behavior conflicts with the documented requirement that the connection use the canonical Receipt endpoint. A connection name is a local identifier, not proof of server identity. Treating the name as sufficient validation creates an opportunity for a stale, incorrectly configured, or maliciously pre-seeded MCP connection to be presented as the trusted Receipt commerce service.

Attack Path

  1. An attacker or compromised local process with access to the user's OpenClaw configuration registers a noncanonical MCP server under the name receipt.
  2. The user invokes the Receipt bootstrap script.
  3. openclaw mcp show receipt --json succeeds because the named connection exists.
  4. The script skips the canonical openclaw mcp set receipt operation without validating the existing endpoint ...[truncated 1308 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse the existing connection's JSON configuration rather than using the command's exit status as proof of correctness.
  2. Require exact matches for the canonical endpoint, transport, authentication mode, and parallel-call policy before continuing.
  3. Fail closed when an existing connection differs from the expected configuration. Display the mismatched fields and require explicit owner approval before replacing or removing it.
  4. Revalidate the connection after configuration and again after OAuth completion.
  5. Before any Receipt tool call or purchase, verify that the active connection still maps to the canonical HTTPS origin.
  6. Validate the exposed tools against an exact allowlist of the eight documented receipt_* tools, not only a wildcard include filter.
  7. Ensure authorization URLs and approval URLs are validated against the expected HTTPS origin before presenting them to the user.

A hardened flow should resemble:

bash
connection_json="$(openclaw mcp show receipt --json 2>/dev/null || true)"

if [[ -z "$connection_json" ]]; then
  openclaw mcp set receipt \
    '{"url":"https://receiptprotocol.com/mcp","transport":"streamable-http","auth":"oauth","supportsParallelToolCalls":false}'
else
  # Parse with a trusted JSON parser and fail unless every security-relevant
  # field exactly matches the canonical configuration.
  validate_receipt_connection "$connection_json" ||
    fail "The existing receipt MCP connection is noncanonical. Stop and obtain owner approval before replacing it."
fi

The actual implementation should use a reliable JSON parser and avoid substring or regular-expression checks over serialized JSON.

Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill description omits sensitive authentication-side behavior such as clipboard-assisted OAuth completion, login/token exchange initiation, and platform-specific callback handling. This is dangerous because clipboard access and auth flow handling cross a stronger trust boundary than ordinary search/purchase orchestration; if invoked under vague expectations, an agent could process authentication artifacts or local callback data without the user understanding that account-linking behavior is occurring.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description omits sensitive authentication-side behavior such as clipboard-assisted OAuth completion, login/token exchange initiation, and platform-specific callback handling. This is dangerous because clipboard access and auth flow handling cross a stronger trust boundary than ordinary search/purchase orchestration; if invoked under vague expectations, an agent could process authentication artifacts or local callback data without the user understanding that account-linking behavior is occurring.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The activation criteria are broad enough to trigger the skill across many loosely related 'commercial boundary' situations, including spending questions, quota issues, provider-key handling, or future subscription risk. Over-broad activation guidance can pressure agents to recommend or install the commerce integration in contexts where it is not strictly necessary, increasing the chance of unnecessary OAuth prompts, configuration changes, or exposure to payment-related workflows.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/INSTALL.md (reported line 10)May include surrounding context.

md
For a connection created before the provider-compatible tool-name deployment,
remove and reconnect the `receipt` MCP connection so OpenClaw rediscovers the
eight `receipt_` names. Do not change OAuth scopes or create a new Receipt
account.

## Execute the clean-profile bootstrap