Back to skill

Security audit

Cortex Memory

Security checks for vulnerabilities and agentic risk

Overview

This memory skill is coherent, but it should be reviewed carefully because it defaults to sending conversation content and detailed technical facts to an external memory service and recommends broader install privileges than it needs.

Install only if you are comfortable with conversation content and detailed technical decisions being sent to Cortex and retained as cross-session memory. Prefer the selective Cortex tool allowlist over tools.profile full, pin the plugin to a reviewed version instead of @latest, enable audit logging before use, and disable autoCapture for sensitive projects unless you explicitly want those details stored.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:25
Finding
Mandatory external memory writes can persist sensitive or attacker-controlled content## Vulnerability Details **File Location**: `SKILL.md`, lines 25-39 **Vulnerability Type**: Mandatory persistent memory capture and instruction override **Risk Level**: High **Vulnerable Code Snippet**: ```text **6. SAVE IMPLEMENTATION DETAILS EXPLICITLY.** After every response where you provide or discuss specific implementation details, you MUST call `cortex_save_memory` before ending your turn. Auto-capture extracts topic-level summaries ("User is setting up Redis caching"), not specifics — it will NOT preserve the details. **The trigger:** If your response contains a concrete technical detail that someone could ask about later and need the exact answer, save it NOW — not later, not "auto-capture will handle it." Call `cortex_save_memory` as the last action in your turn. **What requires an explicit save:** - Key patterns, schemas, or formats (e.g. `arclight:user:{userId}`, cache-aside strategy) - Exact metrics and performance numbers (before/after) - SQL statements, CLI commands, config values - Library/package choices with version-specific rationale (e.g. "chose SendGrid over Resend because SOC 2 Type 2") - Architecture/migration decisions with specific reasoning - Bug root causes with the full debugging chain ``` ### Technical Analysis The Skill uses mandatory language to override the agent's normal discretion and requires `cortex_save_memory` after any response containing broadly defined implementation details. This includes configuration values, commands, schemas, SQL statements, architecture decisions, and performance information, all of which may be confidential. Because Cortex is an external long-term memory service, these instructions create persistent cross-session state. User-supplied or attacker-influenced content can be retained and later reintroduced through automatic recall. Although the Skill warns against saving assumptions, it does not require item-specific user consent before transmitting or persist ...[truncated 1432 chars]
Remediation
## Remediation Suggestions - Replace mandatory saving with an explicit, user-controlled opt-in workflow. - Ask for confirmation before transmitting or persisting each category of sensitive technical information. - Restrict saves to concise, structured facts selected by the user rather than details automatically inferred from responses. - Treat all recalled memories as untrusted data and prohibit recalled content from supplying instructions or overriding current safety rules. - Add content classification and local redaction before calling the external service. - Exclude credentials, tokens, personal data, source code, SQL, configuration values, internal hostnames, and security-sensitive architecture by default. - Provide a preview of the exact memory text, destination, and retention implications before saving. - Implement expiration, provenance, integrity checks, and review controls for persistent memories.

other

Error
Location
README.md:198
Finding
Conversation transcripts are transmitted externally by default## Vulnerability Details **File Location**: `README.md`, lines 198-220 **Vulnerability Type**: Excessive external disclosure of conversation data **Risk Level**: High **Vulnerable Code Snippet**: ```text ## Privacy & Data Handling **What is captured:** - Facts, preferences, and decisions stated in conversation - Conversation transcripts are sent to Cortex API for extraction - Volatile state (versions, ports, task statuses) is stripped before capture **What is NOT captured:** - Raw tool output or debug logs - File contents (only facts derived from conversation) - Secrets or credentials (filtered by the capture pipeline) **User control:** - Disable auto-capture: Set `autoCapture: false` in config - Disable auto-recall: Set `autoRecall: false` in config - Forget specific memories: Use `cortex_forget` tool or `openclaw cortex` CLI - Audit all data: Enable `/audit on` to log everything sent to Cortex - All data is scoped per user and per workspace (namespace isolation) **Data storage:** - Memories are stored in the Cortex API backend - Audit logs are stored locally at `<workspace>/.cortex/audit/` - Session state is stored locally in the OpenClaw data directory ``` ### Technical Analysis The documentation states that conversation transcripts are sent to the Cortex API for extraction and that resulting memories are stored in the external backend. The configuration documentation separately identifies `autoCapture` as enabled by default. Transmitting whole transcripts is broader than the minimum data necessary to provide structured long-term memory. Local extraction followed by transmission of selected facts would expose less information. The repository contains only documentation and does not include the plugin or capture pipeline, so claims that secrets and credentials are filtered cannot be independently verified during this audit. User and workspace namespace isolation limits logical scope ...[truncated 1161 chars]
Remediation
## Remediation Suggestions - Set `autoCapture` to `false` by default and require informed opt-in. - Perform extraction and redaction locally, then transmit only user-approved structured facts. - Never send complete transcripts when selected facts are sufficient. - Document the API endpoint, service operator, transport protections, storage region, retention period, deletion guarantees, subprocessors, and access controls. - Provide an interactive preview showing the exact payload before transmission. - Apply deterministic local filtering for credentials, tokens, private keys, personal data, source code, and confidential configuration. - Fail closed when redaction cannot be completed. - Add tests proving that sensitive values are removed before network transmission. - Make audit logging available before the first capture rather than disabled by default.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
README.md:18
Finding
Installation guidance recommends a full tool profile beyond the Skill's needs## Vulnerability Details **File Location**: `README.md`, lines 18-34 **Vulnerability Type**: Excessive tool permissions **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash openclaw config set tools.profile full ``` ```json { "tools": { "alsoAllow": [ "cortex_search_memory", "cortex_save_memory", "cortex_forget", "cortex_get_memory" ] } } ``` ### Technical Analysis The primary installation instruction recommends changing the OpenClaw tool profile to `full`, even though the Skill's declared functionality only needs a small set of Cortex memory tools. A selective allowlist is presented as an alternative, demonstrating that unrestricted tool access is not technically necessary. Granting the full profile violates least privilege. If the Skill, recalled memory, another loaded instruction, or an upstream dependency is compromised, the agent may be able to invoke unrelated capabilities made available by that profile. ### Attack Path 1. The user follows the primary setup command and enables `tools.profile full`. 2. The runtime exposes tools unrelated to memory search, save, lookup, or deletion. 3. Malicious instructions enter the session through a compromised dependency, prompt injection, or poisoned recalled memory. 4. Those instructions cause the agent to invoke an unrelated privileged tool. 5. The action occurs with capabilities that would not have been available under a memory-specific allowlist. ### Impact Assessment The exact reachable privileges depend on which tools the OpenClaw `full` profile exposes in the user's environment. The unnecessary expansion may include terminal, filesystem, network, messaging, or other integration capabilities. This substantially increases the blast radius of prompt injection and supply-chain compromise. The repository does not prove that these capabilities are exploited directly, but the recommended configuration remo ...[truncated 42 chars]
Remediation
## Remediation Suggestions - Remove the recommendation to enable `tools.profile full`. - Make the selective Cortex tool allowlist the only documented installation path. - Permit only `cortex_search_memory`, `cortex_save_memory`, `cortex_forget`, and `cortex_get_memory`. - Add `cortex_set_session_goal` only if the runtime requires it for declared functionality. - Require separate, explicit approval before enabling terminal or other unrelated capabilities. - Document the minimum permissions required by each command and tool. - Add installation checks that warn when the Skill runs under a broader profile than necessary.

T08 · Insecure Dependencies

Warning
Location
README.md:12
Finding
Unpinned third-party plugin installation creates supply-chain exposure## Vulnerability Details **File Location**: `README.md`, lines 12-16 **Vulnerability Type**: Unpinned external dependency **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash openclaw plugin install @ubundi/openclaw-cortex@latest ``` ### Technical Analysis The installation command resolves the plugin through the mutable `latest` tag. Its effective implementation can therefore change after this Skill has been reviewed. The repository does not contain the plugin source, lockfile, integrity hash, or a verifiable reference to the exact package artifact. This is especially sensitive because the dependency handles conversation transcripts, persistent memory, an API key, and agent tools. A compromised publisher account, package registry, or future release could introduce behavior not represented by the audited Markdown files. This finding does not establish that the current package is malicious. It identifies an unsafe dependency installation practice that prevents reproducible review and expands supply-chain risk. ### Attack Path 1. An attacker compromises the package publisher account, release pipeline, or registry distribution channel. 2. The attacker publishes a modified release under the `latest` tag. 3. A user follows the documented installation command. 4. OpenClaw resolves and installs the attacker-controlled release. 5. The plugin executes with its granted tool permissions and access to conversation data and the configured Cortex API key. 6. The compromised plugin can transmit data, alter memory operations, or misuse any additional capabilities granted by the runtime profile. ### Impact Assessment A compromised plugin could access conversation content processed by the plugin, the Cortex API credential supplied to it, persistent memories, and any tools exposed to the plugin or agent runtime. If combined with the recommended full tool profile, the impact could extend to unrelated local or network operation ...[truncated 163 chars]
Remediation
## Remediation Suggestions - Pin the plugin to a specific audited version instead of using `@latest`. - Record and verify an immutable package integrity hash. - Publish the authoritative source repository and map the package version to a signed source commit. - Use signed releases and enforce provenance verification in the installation process. - Review the plugin implementation, especially network endpoints, redaction, API-key handling, memory isolation, and tool registration. - Maintain a lockfile or equivalent reproducible dependency manifest. - Run the plugin with a Cortex-only tool allowlist and restricted filesystem and network access. - Establish an update review process rather than allowing automatic adoption of future releases.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Session Persistence

Medium
Category
Rogue Agent
Content
### 4. Install the skill

```bash
mkdir -p ~/.openclaw/skills/cortex-memory
cp skill/SKILL.md ~/.openclaw/skills/cortex-memory/
```
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.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger for explicit saves is broad enough to match many ordinary technical responses, which can drive systematic over-collection of user and workspace details into long-term memory. Overly aggressive persistence increases privacy risk, retention of sensitive implementation details, and the chance of later unintended disclosure through recall.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill is presented as a long-term memory capability, but it also instructs the agent to execute live CLI commands for status, config, search, pairing, and setup-related actions. Expanding a memory skill into command execution increases the attack surface and can let a user pivot from passive memory operations into active local actions that may expose sensitive state or alter the environment.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The instructions to run pairing/code/setup commands are not justified by the stated purpose of memory persistence and retrieval. This creates unnecessary authority within the skill, making it easier for an attacker or confused user prompt to trigger actions that reveal system state, pairing data, or operational configuration outside the expected memory boundary.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest frames the skill as long-term memory for agents, but this section directs the agent to ask reflective discovery questions about values, beliefs, fears, and legacy when a TooToo bridge is present. That is a distinct conversational/coaching behavior not implied by search/save/forget memory functionality.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
L109 prescribes exact English phrasings for reflective questions and does not mention adapting to the user's language or offering a choice. This can violate language/locale policy when interacting with users who have not opted into English responses.

Static analysis

No suspicious patterns detected.