Back to skill

Security audit

Ultra Memory

Security checks for vulnerabilities and agentic risk

Overview

This is a real local memory skill, but it exposes and persists broad user history with weak default protections that deserve Review before install.

Install only if you are comfortable with a local long-term memory store of your work history. Use a private, chmod 700-style storage directory, avoid logging secrets, prefer scoped storage per user/project, do not expose the REST server without a strong token, and review or patch session ID validation before using it in shared or browser-accessible environments.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
platform/server.py:340
Finding

Unauthenticated REST API Permits Persistent Memory Disclosure and Poisoning

Content
View full analysis
bool: """If a Bearer Token is configured, verify the request header; otherwise allow it.""" if not _BEARER_TOKEN: return True auth = self.headers.get("Authorization", "") if auth.startswith("Bearer ") and auth[7:] == _BEARER_TOKEN: return True self._send_json(401, {"error": "Unauthorized: valid Bearer Token required"}) return False def _send_json(self, status: int, data: dict): body = json.dumps(data, ensure_ascii=False, indent=2).encode("utf-8") self.send_response(status) self.send_header("Content-Type", "application/json; charset=utf-8") self.send_header("Content-Length", str(len(body))) # CORS: permit local web clients self.send_header("Access-Control-Allow-Origin", "*") self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS") self.send_header("Access-Control-Allow-Headers", "Content-Type") self.end_headers() self.wfile.write(body) ``` The profile endpoint exposes and modifies persistent user information: ```python def tool_memory_profile(body: dict) -> tuple[bool, str]: action = body.get("action", "read") profile_file = ULTRA_MEMORY_HOME / "semantic" / "user_profile.json" if action == "read": try: content = profile_file.read_text(encoding="utf-8") return True, content except FileNotFoundError: return True, "{}" elif action == "update": profile = {} if profile_file.exists(): try: profile = json.loads(profile_file.read_text(encoding="utf-8")) except Exception: ...[truncated 2989 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/log_op.py:365
Finding

Unvalidated Session IDs Permit Path Traversal Outside the Memory Storage Root

Content
View full analysis
tuple[bool, str]: session_id = body.get("session_id", "") if not session_id: return False, "Missing session_id parameter" meta_file = ULTRA_MEMORY_HOME / "sessions" / session_id / "meta.json" if not meta_file.exists(): return False, f"Session does not exist: {session_id}" with open(meta_file, encoding="utf-8") as f: meta = json.load(f) ``` ### Technical Analysis The caller-controlled `session_id` is inserted directly into a filesystem path. The implementation d ...[truncated 2437 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/hook_capture.py:74
Finding

Automatic Command Logging Can Persist Credentials Not Covered by the Redaction Denylist

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
package.json:75
Finding

Mutable and Unpinned Dependency Installation Introduces Supply-Chain Risk

Content
View full analysis
=0.1.0" } ``` The installation documentation uses a mutable latest release: ```bash npx clawhub@latest install ultra-memory ``` The advanced configuration also recommends unpinned installations: ```bash pip install lancedb sentence-transformers --break-system-packages ``` Additional unpinned multimedia installation examples include: ```bash pip install pdfminer.six pip install pytesseract pip install openai-whisper ``` ### Technical Analysis The effective code installed by these commands is not fixed to the version reviewed during this audit. Using `@latest`, wildcard versions, unrestricted minimum versions, and unpinned `pip install` commands allows later installations to resolve different package contents. If a package account, registry, transitive dependency, or future release is compromised, users may install and execute code that was not part of the audited artifact. The use of `--break-system-packages` additionally encourages modification of the system-managed Python environment. This can produce dependency conflicts and expands the effect of a compromised package beyond an isolated virtual environment. No evidence was found that the currently reviewed packages are intentionally malicious. The vulnerability is the absence of reproducible dependency controls and the use of mutable installation targets. ### Attack Path 1. A user follows the documented installation or optional-feature instructions ...[truncated 1091 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (210)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a substantial memory feature set with explicit trigger logic, but the provided code chunk is only a placeholder package initializer containing a comment. There is no evidence of storage, retrieval, persistence, session recovery, keyword search, or trigger processing. This is a clear description-to-code mismatch because the actual code does not implement the stated primary purpose at all.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The high-level theme matches partially: the code is about persistent memory, loading prior context, and logging conversation turns. However, the declared description emphasizes an end-user skill that must trigger on specific Chinese/English phrases and implicit task patterns, automatically recording and restoring across sessions. This code chunk does not inspect user messages for any of those trigger conditions; it only exposes a programmatic memory class with load/save/clear methods for LangChain. That is a materially different operational behavior from the declared trigger-driven skill. Additionally, while the description claims keyword retrieval support, the query-based recall implementation appears flawed because subprocess.run is called with capture_output=True while stdout is separately redirected to StringIO, and the subprocess output is never read from the CompletedProcess object, so the returned context likely remains empty. Therefore the description does not accurately represent this code chunk's actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The code is related to persistence/memory, so it is not entirely unrelated. However, the declared description promises a broader user-facing cross-session memory system that automatically records operations, restores after conversations, and supports keyword search over historical actions with specific trigger behavior. The supplied code only provides a file-backed LangGraph checkpoint backend with explicit put/get/get_latest/list_threads methods. It does not implement keyword search, user-trigger logic, or a general action-history memory model. Thus the description overstates and materially differs from the actual implemented behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The core memory-related behavior (init/log/recall across sessions) is broadly consistent with the declared memory purpose. However, this code also implements a separate profile command that can read and update user profile data, which is not mentioned in the declared description, triggers, or permissions. That is an undeclared capability affecting stored user-related data. Also, the description emphasizes automatic recording and trigger-based activation, but this code chunk is only a manual CLI/n8n wrapper and does not itself implement those trigger rules or automatic post-operation logging. While missing trigger logic alone could be due to architecture, the undeclared profile functionality is a clear material mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description presents a conversational memory skill whose main behavior is automatic cross-session memory for an AI agent, with specific natural-language trigger conditions in Chinese and English. The supplied code instead is infrastructure: a standalone REST server that exposes memory tools over HTTP. While some core functionality aligns with the memory theme (session init/log/recall/restore), the implementation materially adds undeclared capabilities such as network serving, optional bearer-token auth, user profile storage, entity index management, and a separate knowledge-base append tool. In addition, the prominent trigger logic described in natural language is absent from this code; there is no phrase detection or implicit trigger heuristic here. Therefore the declared description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description centers on remembering: automatic recording after each operation, restoring memory across sessions, and retrieving past operations by keyword. The supplied code does not implement recording, restoration, retrieval, or trigger handling. Instead, its primary function is the opposite side of memory management: decaying and soft-deleting memories over time based on age, access frequency, importance, and TTL rules. It reads and writes memory metadata files under the ultra-memory data directory and appends a decay log, which is a materially different capability from the declared user-facing purpose. While forgetting could be part of a broader memory system, this specific code chunk's actual behavior is not accurately represented by the declared description, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description says the skill should trigger only for specific Chinese/English memory-related phrases or an implicit A+B condition, and should not trigger for casual/single-question cases or when the user says not to record. This code does not inspect user intent or those trigger conditions at all: on every turn end it initializes/resumes a session and logs the interaction automatically, with failures silently ignored. It also optionally logs every tool call, a capability not mentioned in the declared purpose. While automatic recording and session restoration are consistent with the general memory theme, the trigger behavior is materially different from what is declared. Additionally, the declared support for keyword-based retrieval is not implemented in this code snippet. Therefore the supplied code chunk does not accurately match the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description focuses on user-facing memory capture, restoration, and keyword-based recall behavior triggered by conversational cues. The actual code does none of that. Instead, it performs housekeeping on stored session data: identifying sessions older than N days, deleting or archiving them, updating the index accordingly, and optionally running another script before cleanup. While cleanup could be part of a broader memory system, this chunk’s primary purpose is retention management, not cross-session memory recording/retrieval. These are materially different capabilities and are not disclosed in the description, so this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description promises a user-facing cross-session memory capability: automatic logging after each operation, restoring memory after a session, and keyword-based history lookup, with explicit Chinese/English trigger phrases and implicit trigger logic. The code shown does something materially different: it is a backend conflict detector that compares new profile/knowledge entries against persisted semantic storage, identifies inconsistencies, and marks older data as superseded. While this could be a supporting component within a larger memory system, this chunk’s actual primary purpose is contradiction management, not memory capture/retrieval. It also directly accesses and rewrites semantic storage files, which is more specific than the declared behavior. Because the code lacks the key promised behaviors and instead implements an undeclared core capability, this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This is a clear description-behavior mismatch. The description presents a user-facing long-term memory feature with conversational triggers and capabilities around saving, resuming, and searching prior work. The actual code chunk is an internal maintenance utility focused on detecting contradictions among previously extracted facts in JSONL files. It reads from evolution/facts.jsonl and fact_metadata.json, computes similarity, detects negation/exclusive-pair conflicts, appends contradictions to contradictions.jsonl, and updates metadata confidence/status through auto-resolution. None of the declared trigger logic appears here, and the core advertised functions—automatic operation recording, session restoration, and keyword search—are absent from this code chunk. While contradiction handling could be a supporting subsystem of a memory product, this specific chunk's primary behavior is materially different and undeclared.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description promises a general long-term memory feature for cross-session continuity: auto-logging actions, resuming after the session ends, and searching past operations by keyword. This code does not implement those functions. Instead, it manages a structured user profile file and evolves specific fields based on extracted facts, with Bayesian confidence updates, correction history, schema migration, and timestamp maintenance. While this could be part of a broader memory system, the actual code chunk’s primary purpose is user-profile maintenance, not conversation/action memory storage or retrieval. The declared trigger phrases are also not represented in this code; the code is invoked via CLI arguments or by other components. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description focuses on runtime memory behavior for an AI agent: automatic recording after each operation, restoring memory at session end/start, keyword-based historical retrieval, and specific trigger conditions in Chinese/English. The actual code chunk does none of that. It is an administrative backup/export script that traverses local directories under ULTRA_MEMORY_HOME and writes their contents into a zip file, optionally filtering sessions by project and date and including archived data. While exporting memory data is related to the broader product domain, this code’s primary purpose is materially different from the declared user-facing memory/recall functionality, and it introduces an undeclared capability: filesystem export/backup of stored memory data. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description promises a fairly complete memory system for an AI agent: automatic recording after actions, recovery of prior session context, and searchable recall of historical operations based on user phrases and implicit triggers. The actual code chunk only provides a local write path: it saves a title/content/project/tags record into semantic/knowledge_base.jsonl and performs approximate deduplication by comparing token overlap with existing entries. This is related to memory persistence, but it is only one narrow component of the declared system. There is no code for reading or restoring memories, no retrieval/search API, no session handling, no automatic capture of operations, and no trigger enforcement. Therefore the code’s actual behavior is materially narrower and different from the declared purpose, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description claims an AI-agent memory skill that auto-records after each operation, restores context after a session, and activates based on specified Chinese/English phrases or implicit task patterns. The code shown is not that behavior layer; it is an admin CLI (manage.py) for inspecting and maintaining already-stored memory files under ULTRA_MEMORY_HOME. While one declared feature—keyword search across history—is partially consistent with the search subcommand, the primary purpose is materially different. The code also adds undeclared capabilities such as exporting all stored data, deleting old sessions (gc), modifying stored records (tier), and enumerating isolated scopes. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The core declared purpose—persistent cross-session memory with logging, restoration, and recall—is represented by the code. However, the implementation materially extends beyond that description by adding several undeclared capabilities: direct user profile storage/editing, structured entity indexing/search, knowledge base writing, and listing/managing isolated scopes for multiple users/agents. These are not merely internal support details; they are exposed as separate callable tools. Also, the description strongly emphasizes mandatory Chinese/English trigger phrases and implicit trigger logic, but this server code contains no trigger-detection logic at all; it only exposes MCP tools for external callers. That creates a description/behavior gap. Therefore the description does not accurately represent the full actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose centers on persistent memory across sessions, automatic logging of operations, restoring prior context, and searching historical actions. The actual code chunk contains only an init.py comment for a multimodal package and references libraries typically used for PDF text extraction, OCR, and speech transcription. That is materially different from the stated memory functionality. While this snippet is minimal, based on what is provided there is no implementation evidence supporting the declared behavior, and the referenced multimodal capabilities are undeclared relative to the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose describes a conversational memory feature for AI agents, including automatic post-operation recording, session restoration, keyword retrieval, and explicit/implicit trigger conditions based on user utterances. The supplied code instead performs document-processing: it reads a Word document from disk, extracts paragraph/table text, writes a .txt artifact into a session folder, and reports basic stats. While storing output under an 'ultra-memory' session path may be related to a broader memory system, this specific code chunk's primary function is multimodal DOCX ingestion, not memory management. The trigger rules in the description are also not represented anywhere in the code. Therefore the actual behavior is materially different from the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose centers on persistent conversational memory for an AI agent: automatically logging actions, restoring memory across sessions, and retrieving prior operations by keyword based on specific user triggers. The actual code chunk instead processes an image path passed via CLI, runs OCR with pytesseract/Tesseract, and saves the extracted text under a session's multimodal directory. While the file path suggests it may be part of a larger 'ultra-memory' system, this code chunk itself is specifically an image-text extraction utility, not the described memory-management feature. The mention of 'triggering fact extraction' appears only in a comment and is not implemented here. Therefore the code's primary purpose is materially different from the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose describes an AI memory feature focused on cross-session memory capture and retrieval based on user utterance triggers. The actual code instead processes PDF files: it extracts text from a provided PDF path, saves output under a session directory, and initiates downstream fact extraction. While storing content under a session folder is loosely related to memory infrastructure, this specific code chunk’s primary function is multimodal PDF ingestion, not general memory recording/restoration or trigger handling. The declared triggers are also unsupported by this code, which is only a CLI tool accepting --path and --session arguments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose centers on persistent cross-session memory for an AI agent: automatically recording actions, restoring memory after a session ends, and retrieving historical operations by keyword based on specific user utterance triggers. The supplied code instead performs multimodal video transcription: it loads a Whisper model, transcribes a local video file, and writes the resulting text into a session-specific multimodal directory. While it stores output under an ultra-memory session folder, that is only as a destination for transcript files and does not realize the declared memory features. The primary purpose, capabilities, and invocation model are materially different from the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This is a description-behavior mismatch. The declared description presents a broad cross-session memory skill centered on automatic recording after each operation, restoring prior session state, and keyword recall, plus detailed trigger conditions. However, the provided code chunk only covers retrieval-side behavior: it searches local memory artifacts (ops.jsonl, summary.md, semantic knowledge base, entity index, user profile, session index) and formats results. It includes advanced retrieval features such as BM25 scoring, synonym expansion, time decay, RRF fusion, optional embedding/cross-encoder reranking, entity history inspection, and time-travel queries. Those are partly consistent with 'keyword retrieval' but materially narrower than the declared end-to-end memory lifecycle and also include additional undeclared features. Most importantly, there is no code here for automatic recording after every action, no code for automatic restore/continue behavior, and no trigger handling logic. Therefore the supplied chunk does not accurately represent the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个完整的跨会话记忆系统,包含记录、恢复、检索以及基于用户话术的触发机制。但给出的代码块只是 restore.py:它从本地 ~/.ultra-memory/sessions 读取历史会话文件,选取指定 project 的最近会话,分析最近操作和里程碑,输出恢复摘要、状态和建议。这与“会话恢复”部分一致,但与“自动记录”“关键词检索”“按特定用户表达触发”等关键宣称不一致。虽然这可能只是整个技能的一部分文件,但基于所提供代码块本身,描述明显覆盖了更多能力,因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents the skill as a full cross-session memory system with automatic recording, end-of-session restoration, and keyword retrieval, plus explicit/implicit trigger conditions. However, the supplied code only covers one backend maintenance component: summarizing existing ops logs into markdown summaries, marking entries as compressed, updating metadata, and compacting older summaries. It does not capture user messages, decide when to trigger, restore memory into a live session, or perform keyword-based search. While summarization/compression is related to a memory system, the chunk’s actual primary purpose is narrower and materially different from the declared end-user functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description says actions are recorded and restored, but it does not clearly warn that user actions, preferences, reasoning, and profile-like attributes may be persistently stored across sessions. In a memory skill, incomplete disclosure is especially dangerous because users may reveal sensitive operational or personal information under the assumption it is ephemeral.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill mandates broad cross-session retention and disclosure of user history, then instructs the model to show recalled content directly to the user without filtering. This creates substantial privacy risk, especially in multi-user, shared-agent, or scope-misconfigured environments where historical content may include secrets, credentials, or unrelated prior context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.