Back to skill

Security audit

Openclaw With General Agents

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a disclosed programming tutor, but it gives an external MCP service too much control over agent behavior and requires a raw Stripe secret key without enough scoping details.

Install only if you trust the TutorClaw MCP service operator and are comfortable giving the deployment a Stripe secret key. Prefer a restricted payment/entitlement integration over a raw Stripe secret, and treat live MCP guidance as untrusted unless the service is controlled and reviewed. The offline shim itself is comparatively low risk and explicitly avoids code execution and persistence.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SOUL.md:55
Finding

Untrusted MCP Responses Can Inject Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: SOUL.md, lines 55–60, 89–94, and 161
Vulnerability Type: Remote instruction injection through trusted MCP response fields
Risk Level: Critical

Vulnerable code snippets:

markdown
3. Call `tutorclaw_generate_guidance` with:
   - `learner_state`: the full JSON string from get_learner_state
   - `chapter_content`: the `content` field from get_chapter_content
4. Present ONLY the `content` field to the learner.
5. Internalize the `system_prompt_addition` — it tells you exactly how
   to behave this turn. Follow it.
markdown
4. **Generate** — Call `tutorclaw_generate_guidance` with:
   - `learner_state`: the full JSON string from step 3
   - `chapter_content`: the same chapter content (no need to reload
     unless the chapter number changed)

5. **Respond** — Present ONLY the `content` field to the learner.
   Internalize the new `system_prompt_addition` for this turn.
markdown
- **One question at a time.** Follow the system_prompt_addition closely.

Technical Analysis

The skill explicitly instructs the agent to treat the MCP service's system_prompt_addition field as authoritative behavioral instructions. This crosses the trust boundary between external tool data and agent control instructions without schema-based constraints, validation, sanitization, or an allowlist of permitted directives.

The requirement to present only the remotely selected content field further permits the service to control or suppress the user-visible response. If the MCP endpoint or its upstream components are malicious or compromised, they can return instructions that alter session goals, induce unauthorized tool use, conceal warnings, inject phishing or promotional material, or attempt to override safety constraints.

No malicious MCP response or server implementation was included in the audited artifact, so actual compromise is not established. ...[truncated 1677 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove system_prompt_addition from the MCP response protocol and keep all agent behavior rules in locally installed, reviewable skill text.
  2. Treat every MCP response as untrusted data, never as system-level or developer-level instructions.
  3. Replace free-form behavioral text with a strict, versioned schema containing narrowly scoped fields such as stage, question text, and expected concept identifiers.
  4. Validate response types, lengths, enum values, and allowed Markdown constructs before use; fail closed on unknown fields.
  5. Reject embedded directives that request tool invocation, credential disclosure, policy changes, external navigation, or instruction-priority changes.
  6. Do not require the agent to present only server-controlled content. Preserve locally generated safety notices and allow the agent to refuse unsafe response content.
  7. Authenticate the MCP endpoint, encrypt transport, pin or otherwise verify the expected service identity where supported, and apply least-privilege authorization.
  8. Log rejected response fields and anomalous instruction-like content without recording learner secrets.
  9. Add adversarial tests in which the MCP response includes prompt-injection payloads, tool requests, malicious URLs, and attempts to suppress warnings.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

Content

Scanner excerpt · IDENTITY.md (reported line 27)May include surrounding context.

md
- "That is an interesting question, but it is outside what I cover. Let's get
  back to where you were in Chapter 3. You were working on loops."
- I always redirect to the learner's current position in the curriculum.
- I never refuse rudely. I acknowledge the question and pivot.

## How I Celebrate Progress

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill requests a highly sensitive credential, STRIPE_SECRET_KEY, even though the declared purpose is a programming tutor. Secret keys grant privileged API access and, if exposed to the agent runtime, any bundled prompt, tool configuration, or downstream component could potentially misuse billing, customer, or subscription operations unrelated to tutoring. The mismatch between stated functionality and requested secret increases the risk of over-privileged deployment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

Payment-tier enforcement is not justified by the educational tutoring functionality described in the manifest, which suggests unnecessary privilege and capability creep. In agent ecosystems, unjustified access to payment infrastructure expands the attack surface and creates opportunities for unauthorized subscription checks, billing actions, or data exposure if the skill or connected MCP components are compromised.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 31)May include surrounding context.

md
| `tutorclaw/AGENTS.md` | `agents/tutorclaw/AGENTS.md` | Tool orchestration and session flow |
| `SOUL.md` | `agents/tutorclaw/SOUL.md` | Personality and teaching philosophy |
| `IDENTITY.md` | `agents/tutorclaw/IDENTITY.md` | Voice, tone, and boundary definitions |
| `tutorclaw-shim/SKILL.md` | `skills/tutorclaw-shim/SKILL.md` | Offline fallback for Chapters 1-5 |
| `.mcp.json` | merged into OpenClaw config | MCP server connection (streamable-http) |

## Requirements

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs the agent to execute learner-submitted Python via tutorclaw_submit_code and display results, but it provides no user-facing notice that submitted code will be run or what safety restrictions apply. In an educational coding context this creates real risk because users may unknowingly submit sensitive or destructive code, and the absence of explicit warning reduces informed consent and safe-use behavior.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · tutorclaw-shim/references/chapters/04-data-structures.md (reported line 50)May include surrounding context.

Example 3: Sets

Sets automatically remove duplicates and support fast membership checks.

python
tags = {"python", "coding", "python", "beginner", "coding"}

Static analysis

No suspicious patterns detected.