Back to skill

Security audit

Openclaw Memory Manager 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local memory organizer, but it can modify memory files in under-scoped ways and has misleading safety claims about backups and automation.

Review this before installing if your memory folder contains important or sensitive data. Make a separate backup before running organize.sh, avoid scheduling organizer runs automatically, do not pass path-like names to categorize.sh, and treat snapshots as consolidated copies of private memory content.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
categorize.sh:23
Finding

Path Traversal in Memory Categorization Destination

Content
View full analysis
> "$DEST" echo "---" >> "$DEST" echo "# Merged from: $(basename "$SOURCE")" >> "$DEST" echo "# Date: $(date +"%Y-%m-%d %H:%M:%S")" >> "$DEST" echo "" >> "$DEST" cat "$SOURCE" >> "$DEST" echo "✅ Merged into: $DEST" else echo "❌ Cancelled" exit 1 fi else # Move to destination mv "$SOURCE" "$DEST" echo "✅ Categorized as $TYPE: $DEST" fi ``` ### Technical Analysis The user-controlled `NAME` argument is interpolated directly into `DEST`. The script does not reject directory separators, `..` path components, absolute paths, or other path-like input. Although the destination is prefixed with a category directory and suffixed with `.md`, traversal components can escape the intended directory. For example: ```text NAME=../../target DEST=$MEMORY_DIR/semantic/../../target.md ``` After path resolution, this destination is outside `memory/semantic`. Additional traversal components can escape further up the filesystem hierarchy. The `SOURCE` argument is also unrestricted apart from the requirement t ...[truncated 1837 chars]
Remediation
View remediation
&2 exit 1 fi ``` 2. Explicitly reject path separators: ```bash case "$NAME" in *"/"*|*"\\"*) echo "Path separators are not permitted" >&2; exit 1 ;; esac ``` 3. Canonicalize and validate the destination after selecting the category: ```bash category_dir="$MEMORY_DIR/$TYPE" mkdir -p -- "$category_dir" category_real=$(realpath -- "$category_dir") dest_real=$(realpath -m -- "$category_dir/${NAME}.md") case "$dest_real" in "$category_real"/*) ;; *) echo "Destination escapes category directory" >&2; exit 1 ;; esac ``` 4. If the source is intended to be a memory file, canonicalize it and require it to remain beneath an approved directory such as `memory/legacy`. 5. Use `mv -- "$SOURCE" "$DEST"` and `cat -- "$SOURCE"` to prevent option interpretation and make the safety intent explicit. 6. Avoid interactive merging in automated agent workflows. Require an explicit `--merge` option and validate the destination before any append operation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
organize.sh:17
Finding

Unsafe Word Splitting and Globbing During Bulk Memory Organization

Content
View full analysis
/dev/null) if [ -z "$FLAT_FILES" ]; then echo "✅ No flat files to organize." echo "" echo "Memory structure already clean:" echo " - Episodic: $(ls "$MEMORY_DIR/episodic"/*.md 2>/dev/null | wc -l | tr -d ' ') entries" echo " - Semantic: $(ls "$MEMORY_DIR/semantic"/*.md 2>/dev/null | wc -l | tr -d ' ') topics" echo " - Procedural: $(ls "$MEMORY_DIR/procedural"/*.md 2>/dev/null | wc -l | tr -d ' ') workflows" exit 0 fi echo "Found $(echo "$FLAT_FILES" | wc -l | tr -d ' ') flat files to organize." echo "" # Backup first mkdir -p "$MEMORY_DIR/legacy" echo "Creating backup in memory/legacy/..." for file in $FLAT_FILES; do filename=$(basename "$file") # Skip special files if [[ "$filename" == "MEMORY.md" ]] || [[ "$filename" == "README.md" ]]; then continue fi # Check if it's a date-based file (episodic) if [[ "$filename" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}\.md$ ]]; then # Move to episodic mv "$file" "$MEMORY_DIR/episodic/" echo " → Episodic: $filename" else # Copy to legacy for manual review cp "$file" "$MEMORY_DIR/legacy/" echo " → Legacy (review): $filename" echo " Manual categorization needed. Use:" echo " categorize.sh semantic|procedural|episodic \"$filename\"" echo "" fi done ``` ### Technical Analysis The script stores newline-delimited `find` output in a scalar variable and then iterates over it using: ```bash for file in $FLAT_FILES ``` Because the expansion is unquoted, the shell applies word splitting and pathname expansion. A valid filename containing spaces, tabs, newlines, `*`, `?`, or bracket expressions may therefore be transformed into multiple operands or expanded to other match ...[truncated 1719 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
snapshot.sh:32
Finding

Unsafe Filename Iteration Produces Incomplete or Incorrect Snapshots

Content
View full analysis
> "$SNAPSHOT_FILE" tail -n 30 "$file" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" done else echo "*No recent episodic entries*" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" fi # Capture semantic (key knowledge) echo "## Key Knowledge (Semantic)" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" semantic_files=$(find "$MEMORY_DIR/semantic" -name "*.md" | head -5) if [ -n "$semantic_files" ]; then for file in $semantic_files; do echo "### $(basename "$file" .md)" >> "$SNAPSHOT_FILE" head -n 20 "$file" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" done else echo "*No semantic entries*" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" fi # Capture procedural (important workflows) echo "## Key Workflows (Procedural)" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" procedural_files=$(find "$MEMORY_DIR/procedural" -name "*.md" | head -3) if [ -n "$procedural_files" ]; then for file in $procedural_files; do echo "### $(basename "$file" .md)" >> "$SNAPSHOT_FILE" head -n 20 "$file" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" done else echo "*No procedural entries*" >> "$SNAPSHOT_FILE" echo "" >> "$SNAPSHOT_FILE" fi ``` ### Technical Analysis Each group of candidate files is stored in a scalar variable and expanded unquoted in a `for` loop. The shell consequently applies word splitting and pathname expansion before `head`, `tail`, or `basename` receives the path. Files containing whitespace may be divided into several invalid paths. Filenames containing wildcard characters may expand to additional matchin ...[truncated 1313 chars]
Remediation
View remediation
= 3 )) && break echo "### $(basename -- "$file" .md)" >> "$SNAPSHOT_FILE" tail -n 30 -- "$file" >> "$SNAPSHOT_FILE" || exit 1 echo "" >> "$SNAPSHOT_FILE" ((count++)) done ``` Apply equivalent handling to semantic and procedural files. Also: - Use `-type f` in each `find` invocation. - Use `--` before every filename passed to `head`, `tail`, and `basename`. - Check all read and append operations for failure. - Write to a temporary snapshot and atomically rename it only after successful completion. - Do not print a success message or update state if any selected file could not be read. - Add tests for filenames containing spaces, newlines, glob characters, and leading hyphens. ]]>
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding identifies the same core issue: the skill advertises safety-relevant memory-management behavior that is not substantiated in the provided file. In agent environments, overstating reliability is dangerous because operators may defer backups or recovery actions under the false assumption that the skill is automatically monitoring and preserving important state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding identifies the same core issue: the skill advertises safety-relevant memory-management behavior that is not substantiated in the provided file. In agent environments, overstating reliability is dangerous because operators may defer backups or recovery actions under the false assumption that the skill is automatically monitoring and preserving important state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding identifies the same core issue: the skill advertises safety-relevant memory-management behavior that is not substantiated in the provided file. In agent environments, overstating reliability is dangerous because operators may defer backups or recovery actions under the false assumption that the skill is automatically monitoring and preserving important state.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding identifies the same core issue: the skill advertises safety-relevant memory-management behavior that is not substantiated in the provided file. In agent environments, overstating reliability is dangerous because operators may defer backups or recovery actions under the false assumption that the skill is automatically monitoring and preserving important state.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README advertises capabilities such as auto-snapshots and semantic search that are not clearly supported by the documented implementation, creating a misleading trust boundary for users. In an agent skill, overstated automation and memory-safety features can cause operators to rely on protections that may not exist, increasing the chance of data loss or unsafe autonomous behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation presents the system as knowledge-graph or semantic retrieval architecture while the described tooling appears to be manual file organization plus typed search. This can mislead users and agents into assuming stronger retrieval, classification, or safety guarantees than actually exist, which is risky for memory-management infrastructure relied on for context integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README documents a migration command that reorganizes existing memory files without prominently warning that user data will be modified. For a local memory-management skill, silent or underexplained file migration can lead to accidental overwrites, broken workflows, or loss of data provenance if users run it assuming it is non-destructive.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README recommends scheduled recurring execution of file-organization commands without warning about repeated modification of user memory. In agent contexts, automation magnifies risk: a mistaken categorization, buggy migration rule, or non-idempotent organizer could repeatedly alter or degrade memory stores without human review.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes the skill as providing local memory management focused on compression detection, auto-snapshots, semantic search, and tracking memory usage patterns. This script instead manually relocates or merges arbitrary files into category folders, a distinct content-organization capability that is not mentioned in the stated behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script performs file migration and restructuring of the memory store, which exceeds the stated skill scope of detection, snapshots, search, and usage tracking. In a memory-management context this is dangerous because it can unexpectedly alter or relocate user data, increasing the risk of confusion, broken workflows, or effective data loss if other tools expect files to remain in place.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script states it creates a backup first, but for date-named files it directly moves them into the episodic directory without preserving a copy in the legacy backup location. This mismatch can lead users to believe a recoverable backup exists when it does not, making accidental misclassification, interrupted execution, or downstream processing errors more harmful because the original file location is destroyed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script automatically aggregates and persists memory contents from episodic, semantic, and procedural stores into a single Markdown snapshot file without any access controls, redaction, consent prompt, or explicit sensitivity handling. In a memory-management skill, those files may contain prior prompts, secrets, tokens, personal data, or internal workflows, so centralizing them into snapshots increases the chance of unintended disclosure through local compromise, backup sync, or later agent/tool access.

Content

No source excerpt is available for this finding.