Back to skill

Security audit

AVM Memory

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate shared-memory skill, but it needs review because it documents cross-agent message injection into another agent's next file read plus persistent, broad memory services.

Install only if you are comfortable giving AVM persistent local memory and multi-agent sharing authority. Before enabling it, disable or strictly gate urgent Tell injection, limit which agents can send messages or broadcasts, scope writable paths and project indexing narrowly, avoid enabling HTTP/script/plugin handlers unless needed, and treat all cross-agent message bodies as untrusted content.

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
README.md:505
Finding

Arbitrary Cross-Agent Instruction Injection Through Urgent Messages

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 505–527
Vulnerability Type: Cross-agent prompt and context injection
Risk Level: High

Vulnerable Code Snippet

bash
## Cross-Agent Messaging (Tell)

Send important messages to other agents:

# Send urgent message (injected into recipient's next read)
echo "DB schema changed!" > /mnt/avm/tell/kearsarge?priority=urgent

# Send normal message
echo "FYI: New API deployed" > /mnt/avm/tell/kearsarge

# Broadcast to all agents
echo "Team meeting at 3pm" > /mnt/avm/tell/@all

# Check your inbox
cat /mnt/avm/:inbox

# Mark all as read
cat "/mnt/avm/:inbox?mark=read"
text
Priority levels:
- urgent - Injected into next file read (any file)
- normal - Shown in :inbox
- low - Only shown when explicitly reading :inbox

Technical Analysis

The documented urgent messaging mechanism automatically inserts sender-controlled content into the recipient agent's next file-read result, regardless of which file is read. This mixes data from one trust domain with the output of an unrelated operation and presents it directly in the recipient agent's active context.

An attacker with access to the Tell interface could submit content phrased as authoritative instructions rather than an ordinary notification. Because the message is inserted into an arbitrary file read, the recipient may not expect third-party content or distinguish it from trusted file contents. The documentation does not describe provenance labels, sender authorization, content boundaries, recipient confirmation, escaping, or instructions requiring the recipient to treat the inserted message as untrusted data.

The feature exceeds the minimum privileges required for cross-agent messaging. An explicit inbox already supports collaboration without granting senders the ability to modify the apparent result of unrelated reads.

Attack Path

  1. An attacker gains legitimate or compromised access to an agent identity that ...[truncated 1586 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic insertion of urgent messages into file-read results.
  2. Deliver all cross-agent messages through a separate, explicitly requested inbox or typed messaging channel.
  3. Return structured metadata with every message, including sender identity, timestamp, priority, authorization status, and a clear untrusted-content marker.
  4. Require recipients to explicitly retrieve or approve urgent messages before including them in an agent context.
  5. Enforce per-recipient access-control lists so only authorized identities can send messages.
  6. Prevent broadcasts by default and require a dedicated capability for access to @all.
  7. Treat message bodies strictly as untrusted data and ensure they are never concatenated with system instructions, tool responses, or file contents.
  8. Apply message length limits, rate limits, quotas, replay protection, and comprehensive audit logging.
  9. Provide agents with explicit guidance that message content must not override system, developer, user, or security instructions.
  10. Add adversarial tests covering instruction-like messages, impersonation, broadcasts, privilege differences between agents, and attempts to induce sensitive tool calls.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Ssd 1

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Urgent messages being 'injected into the recipient's next read' is a direct semantic prompt-injection primitive. Because the product is designed for multi-agent shared memory and collaboration, this context makes the issue more dangerous: any agent or compromised integration able to write tell messages can manipulate another agent at the point of task execution.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
avm archive --threshold 0.2

# 软删除
avm delete /memory/old.md

# 恢复
avm restore /trash/memory/old.md

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly states '无需任何 API key,无网络依赖' ('no API key, no network dependency') as a core value, which communicates a network-free design. Later sections document an http provider and REST API calls, which are network-dependent capabilities, so the documentation contradicts itself about what the system actually does.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The comparison section says AVM's architecture is a 'Pure storage layer,' implying passive storage behavior. Later configuration and handler sections add HTTP calls, script execution, plugins, and database queries, which go beyond a pure storage layer and actively integrate with external systems.

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

md
- **Multi-Agent** - Permissions, quotas, audit logging
- **Tell System** - Cross-agent messaging with priority levels (urgent/normal/low)
- **Full-Text Search** - FTS5 (English recommended; Chinese lacks tokenizer support)
- **Semantic Search** - Local embedding (all-MiniLM-L6-v2), zero API cost, auto-index on write
- **TopicIndex** - O(1) recall for known topics, reduces hop count from 4 to 1
- **Librarian** - Global knowledge router for multi-agent discovery (95% hop reduction)
- **Gossip Protocol** - Decentralized agent discovery using bloom filter digests

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The markdown explicitly instructs users to use standard shell commands and shows echo "New insight" > /mnt/avm/memory/log.md, which performs a persistent write to the mounted memory store. In a markdown file, SQP-2 applies when behaviors affecting user data are described without warning, and this section does not mention overwrite/persistence risks or suggest caution before writing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 416)May include surrounding context.

md
- pattern: "/live/prices/{symbol}"
    handler: http
    config:
      url: "https://api.example.com/prices/${symbol}"
      headers:
        Authorization: "Bearer ${API_KEY}"
    ttl: 60

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly documents a mechanism for one agent to send content that appears in another agent's context, including urgent delivery semantics. In an agent ecosystem, this creates a prompt-injection channel where untrusted peers can steer decisions, exfiltrate data indirectly, or trigger unsafe actions through context poisoning.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill documentation is predominantly written in Chinese, including headings, instructions, and operational guidance, with no indication that users may choose another language. This creates a language/locale policy concern because the skill effectively constrains usage to a specific language without explicit user opt-in or a documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The feature list states FTS5 (English recommended; Chinese lacks tokenizer support), which steers users toward a specific language/locale in natural-language documentation. Under SQP-3, language-policy issues should be flagged when a specific language is imposed or preferred without user opt-in or a clearly documented justification tied to scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.