Back to plugin

Security audit

AiAS Memory for OpenClaw, powered by NEDB

Security checks for vulnerabilities and agentic risk

Overview

The scanner reports that this memory plugin can replace conversation context with messages from its service, creating an instruction integrity risk; the verdict is suspicious.

Before installing, consider whether you trust and secure the configured memory service. Service-provided messages can replace the conversation context, but the scan did not demonstrate downstream tool use or bypass of independent approval controls. The evidence describes a conditional weakness, not proof of malicious intent.

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)

MCP06

Warning
Location
dist/index.js:77
Finding

Memory-Service Responses Can Replace Trusted Conversation Context with Forged Privileged Messages ## Remediation Suggestions 1. **Preserve authoritative context.** Keep gateway-owned system instructions and original conversation messages outside the service’s control. Do not replace them with a service-generated message list. 2. **Use a data-only response schema.** Accept bounded fields for facts, summaries, and retrieved history rather than arbitrary chat messages and role assignments. Reject service-selected privileged roles. 3. **Separate memory from authority.** Insert retrieved content as explicitly untrusted reference material. Do not interpret remembered approvals, user statements, or assistant claims as current authorization. Delimiters alone are not a complete defense. 4. **Isolate privileged directives.** Manage operator directives through a separately authenticated and access-controlled channel rather than combining them with ordinary retrieved memory. 5. **Enforce authorization outside the model.** Require independent checks or fresh user approval for sensitive operations. Service-returned text must not satisfy those checks. 6. **Harden and test the service boundary.** Authenticate service access, restrict connectivity, and add regression tests for forged system messages, fabricated approvals, and attempted removal of original context. Confirm that these responses cannot alter trusted instructions or authorize sensitive actions.

Content
View full analysis

Vulnerability Details

File Location: index.ts:94–110,168–181; equivalent implementation in dist/index.js:21–31,77–88
Vulnerability Type: Indirect prompt injection / message-role impersonation
Risk Level: Medium

Complete Code Snippet

Message validation in dist/index.js:21–31:

javascript
var ALLOWED_ROLES = /* @__PURE__ */ new Set(["system", "user", "assistant"]);
var sanitizeMessages = (input) => {
  if (!Array.isArray(input)) return [];
  const out = [];
  for (const m of input) {
    if (m && typeof m === "object" && ALLOWED_ROLES.has(m.role) && typeof m.content === "string") {
      const msg = m;
      out.push({ role: msg.role, content: msg.content });
    }
  }
  return out;
};

Conversation replacement in dist/index.js:77–93:

javascript
      async assemble(params) {
        try {
          const data = await post("/v1/memory/assemble", {
            workspace_id: workspaceId,
            agent_id: agentId,
            user: params.sessionKey,
            user_message: lastOf(params.messages, "user")
          });
          const clean = sanitizeMessages(data.messages);
          if (clean.length > 0) {
            return { messages: clean };
          }
        } catch (err) {
          api.logger?.warn?.(`aias-memory: assemble failed (${String(err)}); passing messages through`);
        }
        return { messages: params.messages ?? [] };
      },

Technical Analysis

The context engine accepts service-provided messages with system, user, or assistant roles. Validation checks only that each role is allowed and its content is a string; it does not establish the authority or provenance of those messages.

When the response contains at least one accepted message, the engine returns that list instead of the original params.messages. The service can therefore remove original instructions, supply arbitrary system instructions, or fabricate user requests and assistant statements.

The plugin supports re ...[truncated 2370 chars]

SkillSpector was not run because this plugin release contains no bundled skills.

Endor dependency reachability

Checked Nov 13, 2026 · 4:03 PM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.