Back to skill

Security audit

OpenClaw Cortex Memory

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent long-term memory integration, but it asks agents to install and enable an external plugin and persist cross-session data without enough explicit user control or verification.

Review this before installing if you are comfortable with an agent installing and enabling the external openclaw-cortex-memory plugin, giving it memory-related API credentials, and allowing it to retain or import conversation history across sessions. Prefer installing only after verifying the plugin source or checksum, and use clear rules for what may be stored, synced, reflected into rules, exported, or deleted.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
references/agent-manual.md:22
Finding

Installation of Unverified Third-Party Plugin Packages

Content
View full analysis

Vulnerability Details

File Location: references/agent-manual.md:22-36; the installation workflow is also invoked by SKILL.md:55-57
Vulnerability Type: Supply-chain exposure through unverified package installation
Risk Level: Medium

Vulnerable Code

bash
Preferred install path (README default):

openclaw plugins install clawhub:openclaw-cortex-memory
openclaw plugins enable openclaw-cortex-memory

Fallback install path:

npm pack openclaw-cortex-memory@0.1.0-Alpha.34
openclaw plugins install ./openclaw-cortex-memory-0.1.0-Alpha.34.tgz
openclaw plugins enable openclaw-cortex-memory
rm ./openclaw-cortex-memory-0.1.0-Alpha.34.tgz

The corresponding runtime instruction in SKILL.md:55-57 is:

text
1. Check whether plugin `openclaw-cortex-memory` is available.
2. If missing or disabled, run the install bootstrap guide in `{baseDir}/references/agent-manual.md` with README-consistent install order.
3. After plugin is enabled, run memory retrieval or write operations.

Technical Analysis

The skill directs the agent to retrieve, install, and enable executable plugin code that is not included in the audited project. Neither installation path requires verification of a cryptographic checksum, package signature, immutable artifact digest, publisher identity, or package contents before enabling the plugin.

The npm fallback specifies a package version, but a version string alone does not establish artifact integrity. Registry compromise, publisher-account compromise, package replacement, or an unsafe package source could cause the downloaded artifact to differ from the code that was originally reviewed. Depending on package and host behavior, package lifecycle or installation logic may also execute during packaging or installation.

This is classified as T08: Insecure Dependencies because the principal risk is introducing unreviewed executable code through third-party package distrib ...[truncated 1636 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the plugin to an immutable artifact digest rather than relying only on a package name or mutable version.
  2. Publish an expected SHA-256 or stronger checksum through a separately authenticated channel and verify it before installation.
  3. Require package-signature verification and document the trusted publisher identity and signing key.
  4. Download the package without enabling it, inspect its manifest and executable contents, and run automated dependency and malware scans before installation.
  5. Disable package lifecycle scripts during retrieval or preparation where supported, and review any scripts before allowing execution.
  6. Require explicit, informed user approval before downloading, installing, or enabling third-party executable code.
  7. Run the plugin with least privilege in a sandbox that restricts filesystem, credential, process, and network access.
  8. Provide only narrowly scoped API credentials to the plugin and rotate them if package compromise is suspected.
  9. Maintain a vetted internal mirror or vendor the reviewed plugin source with the skill so that the installed implementation matches the audited artifact.
  10. Preserve and validate the package after installation rather than deleting the only local artifact immediately, enabling incident response and reproducibility.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/agent-manual.md (reported line 35)May include surrounding context.

npm pack openclaw-cortex-memory@0.1.0-Alpha.34 openclaw plugins install ./openclaw-cortex-memory-0.1.0-Alpha.34.tgz openclaw plugins enable openclaw-cortex-memory rm ./openclaw-cortex-memory-0.1.0-Alpha.34.tgz

text

Then verify:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/agent-manual.md (reported line 120)May include surrounding context.

npm pack openclaw-cortex-memory@0.1.0-Alpha.34 openclaw plugins install ./openclaw-cortex-memory-0.1.0-Alpha.34.tgz openclaw plugins enable openclaw-cortex-memory rm ./openclaw-cortex-memory-0.1.0-Alpha.34.tgz

text

Then verify:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the agent to persist user-provided information with store_event, run sync_memory, and optionally reflect_memory, but it does not clearly warn users that conversation content may be stored durably across sessions. This creates a privacy and consent risk because sensitive personal, organizational, or regulated data could be retained and later retrieved without the user fully understanding the persistence behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The template begins in Chinese and is explicitly framed as a system prompt template, which can cause an agent to default to a specific language/locale without checking the user's preference. This can degrade usability, create misunderstandings, and in security-sensitive workflows may cause users to miss important tool-use disclosures or error messages if they do not read that language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The reference documents a destructive operation (delete_memory) with no warning about irreversible deletion, no mention of confirmation requirements, and no guidance on authorization or scope checks. In an agent skill context, this increases the chance that an LLM or integrator invokes deletion based on ambiguous prompts, causing loss of durable records or tampering with memory state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language description of the skill's purpose and capabilities is presented in Chinese, while the file does not indicate that the skill is region-specific or that users may choose another language. This can violate a language/locale policy when the skill effectively forces one language without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The documentation exposes a filesystem-writing capability (export_graph_view with write_snapshot: true) without warning that it creates or modifies files. While not inherently malicious, omitting side-effect guidance can lead agents or users to trigger unexpected writes, which may overwrite data, leak graph contents into artifacts, or violate execution environment constraints.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.