Back to skill

Security audit

Memory On Demand

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple memory-search helper, but it automatically searches broad historical memory and session indexes without clear user confirmation or disclosure controls.

Review before installing. This skill may cause an agent to search previous sessions and memory automatically when you use common history-related phrases. Install it only if you are comfortable with that behavior and the runtime keeps memory and session indexes scoped to the right user or workspace.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:25
Finding

Automatic Retrieval Across Agent Memory and Session Indexes Without Access Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 25-41 and 59-62
Vulnerability Type: Unrestricted retrieval of historical memory and indexed session data
Risk Level: Medium

Vulnerable Instructions

The following is an English translation of the relevant source instructions; shell commands and paths are preserved:

markdown
### 2. Select a retrieval method

**Preferred: QMD search**
```bash
qmd search "search terms" --limit 5

Fallback: Memory search

bash
# Search memory files
grep -r "search terms" ~/.openclaw/workspace/memory/

# Alternatively, use memory_search

3. Return results

Organize the search results and return them to the user.

text

The configuration also states that QMD indexes include the workspace, Butler, researcher, and sessions, while memory files are read automatically.

### Technical Analysis

The skill instructs the agent to search persistent memory and QMD indexes automatically whenever a request appears related to historical information. The searched sources explicitly include session data and multiple indexed scopes.

No authorization check, current-user ownership validation, session isolation, path allowlist, sensitivity classification, or confirmation requirement is specified before retrieval. The fallback command recursively searches the entire Agent memory directory rather than a narrowly scoped file or user-specific namespace. The instructions then direct the agent to return the resulting information to the requester without requiring redaction or relevance-based disclosure controls.

This violates least-privilege principles because a broad conversational trigger can cause access to historical information beyond what is strictly necessary for the request. Whether cross-user disclosure is practically possible depends on the runtime's QMD index and filesystem isolation; the reviewed file alone does not establish that multiple users' records 
...[truncated 1394 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit user confirmation before accessing persistent memory or previous sessions.
  2. Bind every retrieval request to an authenticated user, tenant, and authorized session namespace.
  3. Restrict QMD searches to the current user's approved indexes; exclude cross-role and historical-session indexes by default.
  4. Replace recursive searches of the entire memory directory with an allowlisted, user-specific path.
  5. Apply sensitivity detection and redact credentials, authentication tokens, personal information, and unrelated private content before returning results.
  6. Return only the minimum relevant excerpts rather than complete records or files.
  7. Treat history-related phrases as indicators of intent, not as authorization to access stored data.
  8. Record retrieval events in an audit log containing the requester, authorized scope, query, accessed sources, and disclosed records.
  9. Define retention and deletion controls for memory and session indexes so obsolete sensitive content is not indefinitely searchable.
  10. If safe isolation cannot be guaranteed, disable automatic retrieval and require users to identify an explicitly authorized record or session.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description says the skill performs on-demand memory retrieval but does not clearly warn users that it may automatically search historical memory and QMD data. Without transparent notice or consent, users may reveal or retrieve sensitive prior-session information unexpectedly, especially because the skill is designed to auto-trigger.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list is broad and based on common conversational words like '之前' and '历史', which can cause automatic invocation even when the user did not intend a memory lookup. In this skill’s context, unintended activation can expose historical memory or indexed QMD content unnecessarily, creating privacy and data-minimization risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language description, triggers, workflow, and examples are presented only in Chinese, which can impose a language constraint without user opt-in. The file does not indicate that the skill is intended only for a Chinese-language environment or provide an alternative language option.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.