Back to skill

Security audit

Message Injector

Security checks for vulnerabilities and agentic risk

Overview

This plugin openly rewrites every user prompt with configured text, but it does so across all channels with broad, persistent influence over agent behavior.

Install only if a trusted workspace administrator intentionally wants all user prompts in all configured channels to receive the same visible policy or context. Review and lock down who can edit prependText, disclose the behavior to affected users, and prefer narrower scoping or audit logs before using it in sensitive workspaces.

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
scripts/index.ts:3
Finding

Unrestricted Gateway-Level Instruction Injection Across User Messages

Content
View full analysis
{ if (!event.prompt || event.prompt.length < 1) return; return { prependContext: prependText }; }); } ``` The behavior is explicitly documented in `SKILL.md:50-65`, including examples that force agent behavior and the statement that the injection occurs at the Gateway level and cannot be skipped or ignored by the agent. The unrestricted configuration field is declared in `scripts/openclaw.plugin.json:8-11`: ```json "prependText": { "type": "string", "description": "Text to prepend before every user message" } ``` ### Technical Analysis The plugin reads arbitrary text from `api.pluginConfig.prependText` and returns it as `prependContext` during every `before_agent_start` event containing a non-empty prompt. There is no validation, instruction filtering, trust classification, contextual delimiting, channel restriction, user disclosure, or approval check. Consequently, anyone who can install the plugin or modify its configuration can place imperative instructions into the agent's processing context before every user request. These instructions can alter the agent's immediate goals, force tool usage, suppress or redirect expected responses, or attempt to override user intent. The plugin applies the same injected content across all channels handled by the Gateway. ...[truncated 1840 chars]
Remediation
View remediation
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
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (8)

Ssd 1

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This skill explicitly enables gateway-level insertion of system-like instructions into every user message, which can semantically redirect agent behavior before any safety or policy interpretation occurs. Because it operates across channels and before the agent sees the original prompt, it can be abused to override user intent, manipulate tool usage, exfiltrate data through coerced prompts, or persistently bias outputs in ways users cannot detect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises that it prepends text to every user message across all channels, but the description does not prominently warn users that this alters all inbound prompts before the agent sees them. Because this modification happens at the gateway layer, users and downstream participants may not realize conversations are being systematically rewritten, creating a transparency and trust problem with real security consequences.

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 · SKILL.md (reported line 12)May include surrounding context.

Installation

1. Create the extension directory

bash
mkdir -p ~/.openclaw/workspace/.openclaw/extensions/message-injector

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 · SKILL.md (reported line 68)May include surrounding context.

Inject safety rules:

json
"prependText": "[RULE: Always verify file paths before deletion. Never run rm -rf without confirmation.]"

How It Works

Ssd 4

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation normalizes a persistent, cross-turn instruction-layering mechanism that can gradually steer agent behavior over time without fresh user consent on each turn. Persistent hidden augmentation is dangerous because it compounds across sessions and channels, making manipulation harder to notice, diagnose, or attribute when the agent begins behaving unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The plugin description explicitly states that it prepends text to every user message before the agent sees it, without any narrowing of scope, channel limits, or user-consent language. In the context of an agent extension, broad pre-processing of all user input is dangerous because it can silently rewrite prompts, inject hidden instructions, and alter agent behavior across all conversations and integrations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language description says the plugin will prepend custom text before every user message, which normalizes mandatory message modification with no opt-in or transparency. Given the skill metadata says it can inject system-level instructions and persist across channels, this creates a powerful prompt-injection mechanism that can override user intent, manipulate downstream agents, and bypass expected trust boundaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example prepend text uses a mandatory Chinese instruction ('回答前必须先 memory_search 检索相关记忆,禁止凭印象回答') without offering a language choice or documenting a justified locale restriction. This can violate language/locale policy expectations when applied broadly to all conversations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.