Back to skill

Security audit

basic-memory

Security checks for vulnerabilities and agentic risk

Overview

This memory skill is coherent and not malicious, but it automatically stores and reuses personal context across sessions without requiring prior confirmation.

Review this skill before installing if you share personal or sensitive context with OpenClaw. It does not show evidence of code execution, exfiltration, or deception, but it is designed to save and reuse personal details automatically; install only if you are comfortable with that behavior and plan to review or delete memories regularly.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:38
Finding

Automatic Persistent Storage of Untrusted Personal Context

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 38–51
Vulnerability Type: Agent Memory Poisoning and Excessive Personal Data Retention
Risk Level: Medium

Vulnerable Code

markdown
## Auto-Save During Conversation

Detect and save without being asked when the user shares:

| Signal | Section | File |
|---|---|---|
| Name, job, company, location, family | `## Facts` | `MEMORY.md` |
| "I prefer…", "I hate…", "always use…" | `## Preferences` | `MEMORY.md` |
| "I decided to…", "let's go with…", deadlines | `## Action Items` | `MEMORY.md` |
| Project names, key people, recurring context | daily log | `memory/YYYY-MM-DD.md` |
| Patterns you've noticed about the user | `## Learned` | `MEMORY.md` |

After auto-saving, confirm briefly in one line: "Noted: [distilled fact]."

Related automatic loading behavior is defined at SKILL.md, lines 29–31:

markdown
## On Session Start

OpenClaw auto-loads `MEMORY.md` plus today's and yesterday's daily files. Use this loaded context immediately — no tool call needed. Scan for open Action Items and surface any that are overdue or relevant to the user's first message.

Technical Analysis

The Skill instructs the Agent to persist names, employment information, locations, family details, preferences, project context, and inferred behavioral patterns without obtaining prior consent. The confirmation occurs only after the write.

The persistence logic does not require provenance validation or distinguish direct user assertions from quoted text, externally retrieved material, role-play, forwarded messages, or other attacker-controlled content. Consequently, false facts, preferences, action items, or inferred rules can enter long-term state. Because the Skill instructs OpenClaw to load and immediately use this state in subsequent sessions, poisoned entries may continue influencing the Agent after the original conversation ends.

The sensitive-da ...[truncated 1627 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit opt-in before every persistent write. Display the exact proposed entry, destination file, section, and retention period before saving it.
  2. Treat post-write notification as insufficient; perform the write only after affirmative user confirmation.
  3. Save only direct user assertions. Do not persist information derived from quoted messages, retrieved documents, tool output, third-party content, role-play, or prompt examples.
  4. Disable inferred ## Learned entries by default. If enabled, label them as unverified inferences and require explicit approval.
  5. Record provenance metadata for each entry, including creation time, originating conversation, whether it was directly asserted or inferred, and its verification status.
  6. Apply expiration periods to daily context, inferred patterns, and action items unless the user explicitly requests indefinite retention.
  7. Validate loaded memory as untrusted data rather than executable instructions. Stored entries must not override system policies, safety requirements, or current-session user intent.
  8. Provide simple commands to inspect, correct, export, and permanently delete retained information.
  9. Preserve the existing sensitive-data denylist and expand it to cover additional personal data categories according to the deployment's privacy requirements.
  10. Resolve contradictory entries through explicit user confirmation before using or replacing prior memory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Automatic activation at every new session causes the agent to process and potentially surface prior memory without a fresh request from the user. This weakens user control over when persistent context is used and can reveal sensitive prior-session information in the wrong context or to the wrong person on a shared system.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Automatic activation at every new session causes the agent to process and potentially surface prior memory without a fresh request from the user. This weakens user control over when persistent context is used and can reveal sensitive prior-session information in the wrong context or to the wrong person on a shared system.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description explicitly promotes retaining and reusing personal details across conversations, including when the user did not expressly request storage. Persistent collection of identity, preference, and behavioral data without clear opt-in creates a meaningful privacy risk and can lead to accidental disclosure later.

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 24)May include surrounding context.

└── YYYY-MM-DD.md ← daily log, today + yesterday auto-loaded

text

> Do not write to `~/.openclaw/memory/` — that directory contains the SQLite search index managed by the system. Only the workspace files are yours to read and write.

## MEMORY.md Structure

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

These rules direct the agent to broadly collect names, jobs, locations, family information, preferences, project context, and inferred behavioral patterns into long-term storage. The danger is amplified because the collection is automatic and includes inferred data, which may exceed user expectations and privacy norms.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Prompting at session end to preserve key points encourages conversion of broader conversation content into durable records, which can capture more personal or sensitive data than the user intended to retain. This increases the chance of over-collection and future disclosure, especially after long sessions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.