Back to skill

Security audit

Nowledge Mem Openclaw Plugin

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate memory plugin, but it needs Review because it automatically persists conversations by default and has security gaps around privileged memory injection, remote transport, and unpinned runtime package execution.

Review this before installing in sensitive environments. Prefer local mode or an HTTPS remote server, install and pin a trusted `nmem` CLI yourself, disable `sessionDigest` or use Incognito/`#nmem-skip`/`captureExclude` for confidential sessions, and avoid storing secrets or regulated data unless you accept persistent searchable retention.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
src/context-engine.js:241
Finding

Stored context can inject instructions at system-prompt privilege

Content
View full analysis
WM_CACHE_TTL_MS) { state.wm = await client.readStartupContext(); state.lastWmFetch = Date.now(); } if (state.wm?.available) { const tag = state.wm.source === "context-bundle" ? "nowledge-context-bundle" : "working-memory"; sections.push( `<${tag}>\n${escapeForPrompt(state.wm.content)}\n`, ); } } catch (err) { logger.debug?.(`ce: assemble — startup context read failed: ${err}`); } ``` ```js // src/hooks/recall.js:3-14 const PROMPT_ESCAPE_MAP = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", }; export function escapeForPrompt(text) { return String(text ?? "").replace( /[&<>"']/g, (char) => PROMPT_ESCAPE_MAP[char] ?? char, ); } ``` ### Technical Analysis The Context Engine reads a Context Bundle or Working Memory document and inserts its contents into `systemPromptAddition`. This gives stored content substantially higher instructional influence than ordinary user messages. `escapeForPrompt()` only performs XML/HTML character escaping. It prevents stored text from closing the surrounding XML-like tag, but it does not neutralize natural-language directives such as “ignore the user,” “send data through a tool,” or “save this rule permanently.” The code correctly labels ordinary recalled memories elsewhere as untrusted historical context, but the startup Context Bundle and Working Memory block does not receive an equivalent warning. The project is explicitly designed to share memory originating from browser capture, imported documents, other AI tools, and remote servers. Consequently, compromise or manipulation of any auth ...[truncated 1436 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
src/client.js:211
Finding

Unpinned nmem package may be downloaded and executed automatically through uvx

Content
View full analysis
{ for (const cmd of candidates) { try { const result = await this.runtimeSystem.runCommandWithTimeout( [...cmd, "--version"], { timeoutMs: 10_000, env: this._spawnEnv(), }, ); if ((result.code ?? 1) === 0) { this.nmemCmd = cmd; this.logger.info(`nmem resolved: ${cmd.join(" ")}`); return cmd; } } catch { // Try the next candidate. } } ``` ### Technical Analysis When a locally installed `nmem` executable is unavailable, the client falls back to: ```text uvx --from nmem-cli nmem ``` No exact version or package artifact hash is specified. `uvx` may therefore resolve and execute package content obtained from a package registry at runtime. The effective executable can change after this plugin version has been reviewed and installed. This creates a supply-chain boundary not represented by the audited source artifact. A compromised registry account, malicious upstream release, dependency compromise, or dependency-resolution attack could introduce executable code without requiring an update to this plugin. The command is invoked with the environment created by `_spawnEnv()`, which can include the configured Nowledge Mem API URL, API key, and space. A malicious resolved package could access those values in addition to the permissions of the OpenClaw runtime process. ### Attack Path 1. The host does not have a working `nmem` executable on its command path. 2. The plugin tries the fallback candidate `uvx --from nmem-cli nmem`. 3. `uvx` resolves an unpinned package version from its configured package source. 4. The registry package, one of its dependencies, or the resolution source has been comprom ...[truncated 736 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/client.js:145
Finding

Remote HTTP endpoints can receive API keys and captured conversations without transport encryption

Content
View full analysis
controller.abort(), timeout); const scopedPath = this._withSpaceQuery(path); const scopedBody = this._withSpaceBody(body); try { const requestBody = scopedBody === undefined ? undefined : JSON.stringify(scopedBody); const response = await fetch(`${this.getApiBaseUrl()}${scopedPath}`, { method, headers: this.getApiHeaders(), body: requestBody, signal: controller.signal, }); ``` ```js // src/config.js:326-344 const au = firstDefined( { value: fileUrl || undefined, source: "file" }, { value: pluginUrl || undefined, source: "pluginConfig" }, { value: sharedCfg.apiUrl || undefined, source: "sharedConfig" }, { value: envStr("NMEM_API_URL"), source: "env" }, { value: "", source: "default" }, ); const apiUrl = au.value; _sources.apiUrl = au.source; // --- apiKey: file (legacy) > pluginConfig > sharedConfig > env > "" --- const fileKey = typeof resolvedFile.apiKey === "string" && resolvedFile.apiKey.trim(); const pluginKey = typeof resolvedPlugin.apiKey === "string ...[truncated 2586 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (42)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · CHANGELOG.md (reported line 189)May include surrounding context.

md
### Changed

- Lower-priority `spaceTemplate` values are now evaluated lazily. A broken template no longer overrides a higher-priority concrete `space` value.
- Thread-identity tests now reset conversation-root state between cases, so the suite matches real runtime boundaries more closely.

## [0.8.12] - 2026-04-10

Context Leakage

High
Category
Data Exfiltration
Confidence
91% confidence
Finding

The changelog documents automatic recall of working memory and relevant memories plus automatic conversation-thread capture. In the context of an agent plugin, this can expose prior conversations or user data to future sessions or storage without sufficiently granular consent, making unintended context leakage a real risk if sensitive data is captured or injected into prompts.

Content

Scanner excerpt · CHANGELOG.md (reported line 778)May include surrounding context.

md
- `nowledge_mem_working_memory` : read daily Working Memory briefing
- **Hooks**:
  - `before_agent_start` : auto-recall Working Memory + relevant memories
  - `agent_end` : auto-capture conversation thread
- **Slash commands**: `/remember`, `/recall`
- **CLI**: `openclaw nowledge-mem search`, `openclaw nowledge-mem status`
- **nmem CLI integration**: local-first, no API key required

Context Leakage

High
Category
Data Exfiltration
Confidence
93% confidence
Finding

The plugin explicitly captures conversation threads and sends them through an LLM-based distillation flow at session end, which can expose sensitive prompt content, credentials, personal data, or proprietary context beyond the immediate session. This is especially risky because the feature is enabled by default, and the surrounding config indicates persistent memory storage and optional remote-server use, increasing the chance of unintended data retention or disclosure.

Content

Scanner excerpt · openclaw.plugin.json (reported line 31)May include surrounding context.

json
},
		"sessionDigest": {
			"label": "Session digest at end",
			"help": "Capture conversation threads and distill key memories via LLM at session end. On by default. Negligible cost, one triage call per session."
		},
		"digestMinInterval": {
			"label": "Minimum digest interval (seconds)",

Context Leakage

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

The config schema sets conversation capture and LLM distillation to default true, meaning deployments may begin retaining and processing full thread content without explicit operator enablement. In a memory/context-engine skill, this materially increases leakage risk because the captured data can persist across sessions, be recalled later, or potentially traverse to a remote backend if configured.

Content

Scanner excerpt · openclaw.plugin.json (reported line 102)May include surrounding context.

json
"sessionDigest": {
				"type": "boolean",
				"default": true,
				"description": "Capture conversation threads and distill key memories via LLM at session end. On by default."
			},
			"digestMinInterval": {
				"type": "integer",

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly says to save proactively and describes a cross-AI memory system that stores data from multiple sources, but it does not require clear user notice or consent before persisting conversation content. This creates a meaningful privacy and data-governance risk because sensitive facts, preferences, plans, or contextual details may be retained and linked across tools without the user's informed awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This branch auto-deletes the top search result when its score is at least 0.85, without requiring the user to confirm the selected item. Search results can be ambiguous or manipulated, so this can delete the wrong memory based on fuzzy matching, making destructive loss more likely than direct ID deletion.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
91% confidence
Finding

The code packages full messages and sessionFile into an event and unconditionally sends them into the capture pipeline, which can leak sensitive conversation context beyond the active runtime boundary. In a memory/context-engine skill, this is especially risky because the feature is designed to aggregate and reuse context across turns and sessions, increasing the blast radius of any captured secrets or confidential data.

Content

Scanner excerpt · src/context-engine.js (reported line 400)May include surrounding context.

js
const event = { messages, sessionFile };
				const ctx = { sessionId, sessionKey: normalizedKey };

				// 1. Always capture thread (idempotent, deduped)
				const captureResult = await appendOrCreateThread({
					client,
					logger,

Context Leakage

High
Category
Data Exfiltration
Confidence
94% confidence
Finding

This hook automatically captures user/assistant conversation data after successful agent runs and sends it to external storage and LLM-based distillation services. Although some session types are excluded, the default behavior still persists potentially sensitive context outside the immediate runtime, creating a substantial confidentiality risk if secrets, credentials, or regulated data appear in chat content.

Content

Scanner excerpt · src/hooks/capture.js (reported line 843)May include surrounding context.

js
}

/**
 * Capture thread + LLM-based distillation after a successful agent run.
 *
 * Even when the context engine is active, this hook remains as a safety net.
 * Thread append/create is already idempotent, so the hook path can safely

Context Leakage

High
Category
Data Exfiltration
Confidence
92% confidence
Finding

This lifecycle hook captures thread messages before reset or after compaction, which can preserve content that users may expect to be discarded or reduced. As a result, sensitive context can be durably stored even during state-management events, undermining privacy expectations and increasing exposure if the external thread store is compromised or over-retained.

Content

Scanner excerpt · src/hooks/capture.js (reported line 898)May include surrounding context.

js
}

/**
 * Capture thread messages before reset or after compaction.
 * Thread-only (no distillation) — these are lifecycle checkpoints.
 *
 * This hook also stays enabled when the context engine is active.

Context Leakage

High
Category
Data Exfiltration
Confidence
87% confidence
Finding

This plugin registers lifecycle hooks that capture conversation threads and perform session digesting, which can include user prompts, agent outputs, and potentially sensitive secrets present in the session. Because the plugin also supports non-default remote API endpoints, captured conversational data may be persisted or transmitted outside the local runtime, creating a real context-leakage risk if users enable digesting without strict data-handling controls.

Content

Scanner excerpt · src/index.js (reported line 182)May include surrounding context.

js
);
		}

		// Session digest: capture threads + LLM distillation at lifecycle events.
		if (cfg.sessionDigest) {
			const threadCaptureHandler = buildBeforeResetCaptureHandler(
				client,

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · src/commands/slash.js (reported line 71)May include surrounding context.

js
content: [
							{
								type: "text",
								text: `Failed to delete memory ${memoryId}: ${message}`,
							},
						],
					};

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · src/tools/forget.js (reported line 67)May include surrounding context.

js
content: [
							{
								type: "text",
								text: `Failed to delete memory ${memoryId}: ${message}`,
							},
						],
					};

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The tool description explicitly tells the agent to save conversation-derived information to the user's permanent knowledge graph proactively, without requiring an explicit consent check or warning at the time of capture. This creates a privacy and data-governance risk because sensitive, regulated, or unexpected personal information may be permanently retained even when the user did not knowingly request storage.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The changelog describes persistent thread capture with checkpointing, replay, and local cursor advancement semantics. Even though framed as a reliability improvement, this confirms session persistence behavior that can retain conversation history beyond the live interaction, which increases privacy and retention risk if users do not expect or consent to durable storage.

Content

Scanner excerpt · CHANGELOG.md (reported line 29)May include surrounding context.

md
- Automatic thread capture now sends the paired Mem checkpoint contract
  (`expected_message_count`, a content-bound idempotency key, and
  `append_mode: "checkpointed"`) and only advances the local cursor after an
  explicit append/create acknowledgement.
- Same-length and earlier-prefix replacements reset to a full replay. OpenClaw
  compaction shrinks still reset the local cursor without replaying the
  compacted summary.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The changelog text explicitly refers to an "English-only" heuristic capture pipeline, including English regex patterns, as prior behavior. This natural-language description indicates the skill previously enforced language-specific behavior without user choice, and no opt-in or region-specific justification is provided in the referenced text.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file describes automatic thread capture, LLM triage/distillation, and retention into memory systems, but the warning about privacy implications is minimal and fragmented. In a memory plugin, silent or poorly signposted capture of conversation content can lead to storage of secrets, personal data, or sensitive enterprise context beyond user expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The dreaming integration can promote recalled content into MEMORY.md, which changes persistent memory state indirectly through recall activity. Without a strong warning and consent model, users may not understand that surfaced content can later become durable memory, increasing the chance of accidental persistence of confidential or erroneous information.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · CHANGELOG.md (reported line 375)May include surrounding context.

md
## Skill Surface

- `skills/memory-guide/SKILL.md` - agent behavioral skill auto-discovered by OpenClaw via manifest `skills[]`. Teaches the agent when/how to search, save, explore connections, fetch threads, and use Working Memory. Read on-demand when the agent identifies a memory-related task.

## Hook Surface

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · CLAUDE.md (reported line 151)May include surrounding context.

md
## Skill Surface

- `skills/memory-guide/SKILL.md` - agent behavioral skill auto-discovered by OpenClaw via manifest `skills[]`. Teaches the agent when/how to search, save, explore connections, fetch threads, and use Working Memory. Read on-demand when the agent identifies a memory-related task.

## Hook Surface

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The guidance to 'search before answering' and save important conversation-derived information encourages broad collection and reuse of prior context, which can include sensitive user data that was not meant for long-term memory. In a memory plugin context, this increases the risk of over-collection, inappropriate persistence, and later disclosure through search results or automatic context injection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states that sessions are automatically captured, persisted, and made searchable, but the privacy warning is fragmented and not presented as a prominent upfront consent/retention disclosure. Because conversation transcripts can contain secrets, personal data, credentials, or proprietary information, default capture without strong notice and explicit opt-in creates a real privacy and data-retention risk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation explicitly describes unconditional capture of every conversation and searchable retention of those threads. Even if intended as a feature, this materially increases the chance that sensitive prompts, outputs, tokens, personal data, or business secrets are stored and later resurfaced to users, agents, or other connected tooling, especially in remote/shared-server mode.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs users to place an API key in plaintext inside ~/.nowledge-mem/openclaw.json, but does not warn about credential sensitivity, file permissions, or safer alternatives. This can expose secrets to other local users, backups, dotfile sync tools, screenshots, or accidental source-control inclusion, especially because the file path is stable and easy to harvest.

Content

No source excerpt is available for this finding.