Back to plugin

Security audit

Kichi Forwarder

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this plugin suspicious because scanners report remote messages and server-supplied room metadata entering model-visible agent or tool instructions, creating prompt-injection risks.

Consider the reported prompt-injection paths and the incomplete evidence about transport validation and gateway enforcement before installing. Review whether the agent used by the plugin has access to sensitive information or consequential tools, since the scanner says potential impact depends on that configuration and on gateway permissions.

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 (2)

MCP06

Error
Location
src/index.ts:69
Finding

Remote Bot Messages Enter a Privileged Agent Run with Automatic Response Forwarding ## Remediation Suggestions 1. Replace the normal agent invocation with a dedicated, stateless bot-chat responder that has no tools, credentials, private memory, filesystem access, or access to user conversations. 2. Pass remote messages as structured, explicitly untrusted data. Keep behavioral instructions separate from remote content; do not rely on quotation marks or delimiters as the primary defense. 3. Validate message and history schemas, enforce collection and string-size limits, and reject malformed depth values. 4. Enforce response length and payload-size limits in code before forwarding. Do not concatenate unrestricted agent payloads into a remote reply. 5. Require trusted-user approval before escalating a bot-originated request into any privileged workflow. 6. Add adversarial tests covering injected instructions in names, message bodies, and history. Verify that these inputs cannot trigger tools or disclose private context.

Content
View full analysis

Vulnerability Details

File Location: src/index.ts:69–96; corresponding compiled implementation in dist/src/index.js:54–82
Vulnerability Type: Indirect prompt injection and excessive agent authority
Risk Level: High

Complete Code Snippet

ts
const sessionKey = `agent:${service.getAgentId()}:bot_message`;
const history: BotMessageHistoryEntry[] = [
  ...(msg.history ?? []),
  { from: msg.from, fromName: msg.fromName, bubble: msg.bubble },
];
const historyLines = history.map((h) => `${h.fromName}: "${h.bubble}"`);
const message = `[Bot conversation]\n${historyLines.join("\n")}\n\nReply with a short bubble (2-5 words). Do not repeat what has already been said. Just output the bubble text, nothing else.`;
agentCommandFromIngress({
  message,
  sessionKey,
  agentId: service.getAgentId(),
  senderIsOwner: false,
  allowModelOverride: false,
  deliver: false,
}).then((result) => {
  const replyText = (result.payloads ?? [])
    .map((p: { text?: string }) => p.text)
    .filter((t): t is string => typeof t === "string" && t.trim().length > 0)
    .join(" ")
    .trim();
  if (!replyText) {
    return;
  }
  service.sendBotMessage(msg.from, msg.depth + 1, replyText, { history }).catch((sendErr) => {
    api.logger.warn(`[kichi:${service.getAgentId()}] bot_message send or history record failed: ${sendErr}`);
  });

Technical Analysis

The bot-message handler interpolates remote message text, display names, and supplied conversation history directly into an agent command. Quoting the content does not establish an instruction boundary: embedded instructions remain readable by the model.

The handler invokes the configured agent through agentCommandFromIngress, without demonstrating a separate tool-free execution environment. It then concatenates all returned text payloads and forwards them to the remote sender. The advertised two-to-five-word response restriction is a prompt instruction, not an enforced output limit.

`senderIsOwner: f ...[truncated 2257 chars]

MCP06

Warning
Location
src/tools.ts:333
Finding

Server-Controlled Room Metadata Is Embedded in a Model-Visible Tool Description ## Remediation Suggestions 1. Keep tool descriptions static and developer-controlled. Remove server-derived objects from `buildKichiActionDescription`. 2. Expose prop information through a separate structured tool result explicitly identified as untrusted external data. 3. Validate responses against an allowlisted schema. Retain only required identifiers, supported pose types, occupancy values, and bounded display text; discard unexpected fields. 4. Limit array length and string size before caching or presenting remote metadata. 5. Enforce authorization for consequential operations independently of the model’s interpretation of tool descriptions or results. 6. Add regression tests with instruction-bearing prop names and descriptions. Verify that tool descriptions remain unchanged and that remote metadata cannot authorize unrelated actions.

Content
View full analysis

Vulnerability Details

File Location: src/tools.ts:333–346; description attachment at src/tools.ts:648. Corresponding compiled implementation in dist/src/tools.js:282–287.
Vulnerability Type: Indirect prompt injection through dynamic tool descriptions
Risk Level: Medium

Complete Code Snippet

ts
const roomContext = service?.getCachedRoomContext();
const poseableProps = roomContext?.PoseableProps;
if (Array.isArray(poseableProps) && poseableProps.length > 0) {
  lines.push(
    "",
    "Cached RoomContext.PoseableProps (from last kichi_query_status):",
    JSON.stringify(poseableProps),
    "When using a sit or lay pose, pick the propId whose PoseableProps information best matches the current task context and whose OccupancyState is not fully_occupied. If no prop fits, omit propId.",
  );
}

return lines.join("\n");

The resulting string is assigned to the tool description:

ts
name: "kichi_action",
label: "kichi_action",
description: buildKichiActionDescription(existingService ?? undefined),

Technical Analysis

The plugin serializes cached server-provided PoseableProps objects wholesale into the description of kichi_action. The documented fields include free-text DisplayName and Description values.

At this boundary, the code checks only that the value is a nonempty array. It does not allowlist fields, bound text lengths, or separate remote content from trusted tool instructions.

JSON.stringify escapes JSON syntax but does not neutralize natural-language instructions. An instruction-bearing field can therefore appear alongside legitimate tool-use guidance when the tool definition is built with populated cache data. This promotes lower-trust network content into a surface the model uses to understand tool behavior.

The code establishes the unsafe promotion path. Actual injection effectiveness depends on cache contents, model behavior, and downstream authorization. Sanitization inside the removed core depend ...[truncated 1543 chars]

SkillSpector findings are pending for this release.

Endor dependency reachability

Checked Nov 13, 2026 · 8:17 AM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.