Back to plugin

Security audit

Better Auto Memory

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this plugin suspicious because a completed scan reports that messages from shared-agent participants may be saved as owner-associated persistent memory without checking who is authorized to contribute.

Consider whether the agent accepts messages from multiple people and whether you are comfortable with their statements potentially becoming persistent, owner-associated memory. The scan reports a real authorization and attribution weakness, but does not establish arbitrary code execution, credential access, or data exfiltration; the verdict is suspicious, not malicious.

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)

MCP07

Warning
Location
index.js:306
Finding

Shared-Agent Participants Can Poison Owner-Attributed Persistent Memory ## Remediation Suggestions 1. **Authorize memory contributors.** Require a host-authenticated principal to match an explicit owner or contributor allowlist before promoting messages into owner-associated memory. Default shared-channel capture to disabled or approval-required. 2. **Preserve individual provenance.** Retain authenticated sender, channel, conversation, and message identifiers throughout extraction, outbox storage, summarization, and rendering. Do not apply one event-level identity to messages from multiple speakers. 3. **Bind configured names to verified identities.** Apply an owner display name only after matching the authenticated sender to that owner. Agent-wide configuration alone must not establish authorship. 4. **Separate memory trust domains.** Namespace storage and retrieval by authorized principal and conversation scope. Keep shared-channel evidence separate from private owner preferences. 5. **Require approval for trust promotion.** Store other participants' assertions as explicitly untrusted conversation evidence, not approved owner preferences or decisions. 6. **Apply controls to every persistence path.** Enforce authorization and attribution checks before capture and across successful summaries, disabled summarization, malformed model output, and failure fallbacks. 7. **Add regression tests and cleanup procedures.** Test multi-sender attribution, unauthorized preference insertion, and cross-conversation retrieval. Review existing shared-agent records for misattribution and remove or reclassify affected records and their indexed representations.

Content
View full analysis

Vulnerability Details

File Location:

  • index.js:306–345 — conversation capture without sender authorization and assignment of one identity to the captured increment.
  • lib/messages.js:137–145 — extraction discards individual sender provenance.
  • lib/identity.js:61–65 — agent-wide configured name overrides the actual sender identity.
  • lib/summary.js:229–269,284–301 — fallback record creation and persistent-memory record rendering.

Vulnerability Type: Insufficient authorization and attribution isolation in persistent memory.

Risk Level: Medium.

Vulnerable Code

The capture handler checks the agent and automation source, but does not authorize the sender to establish owner-associated memory:

js
api.on('agent_end', (event, ctx) => {
  try {
    if (!ctx || !cfg.agents.includes(ctx.agentId)) return;
    if (event?.success === false) return;
    if (AUTOMATION_TRIGGERS.has(ctx.trigger)) return;
    if (ctx.inputProvenance?.kind === 'internal_system') return;

User-message extraction retains message content and a key, but no per-message authenticated sender identity:

js
if (role === 'user') {
  if (!hasText(message)) continue;
  items.push({ role: 'user', text: messageText(message), key: message.idempotencyKey ?? null });
  if (typeof message.idempotencyKey === 'string' && message.idempotencyKey) {
    newAnchorKey = message.idempotencyKey;
    newAnchorOffset = i;
  }
}

Identity resolution always prefers the agent-wide configured name:

js
export function resolveUserName({ userNames, agentId, senderId } = {}) {
  const configured = sanitizeName(userNames?.[agentId]);
  if (configured) return configured;
  return hashSenderId(senderId);
}

The captured increment receives that single identity:

js
appendOutboxEntry(workspaceDir, sessionKey, {
  runId: ctx.runId ?? `unknown-${Date.now()}`,
  at: Date.now(),
  heading: localTime(new Date()),
  agentId: ctx.agentId,
  sessionKey,
  userName: resolveName(ctx),
  items,

...[truncated 3072 chars]

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

Endor dependency reachability

Checked Nov 13, 2026 · 4:38 PM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.