Back to skill

Security audit

Cerebro Openclaw Memory Boost Kb

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed markdown memory workflow, but it can make persistent project documents control future agent behavior and update them without clear user consent.

Install only if you intentionally want a documentation-first memory workflow. Before use, keep Cerebro files in a trusted workspace, review any proposed authoritative changes, and require the agent to show exact file diffs before creating or updating memory or policy documents.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:47
Finding
Mutable Workspace Documents Override Current User Instructions## Vulnerability Details **File Location**: `SKILL.md`, lines 47-63 **Vulnerability Type**: Instruction hierarchy manipulation through untrusted workspace content **Risk Level**: Critical ### Vulnerable Code ```markdown ## Decision Rule Pass the **"where does it say that?"** test before acting. - Every action must map to an explicit Cerebro path/section. - If no authoritative doc exists: 1) create the missing Cerebro doc first, 2) add minimal executable guidance, 3) then execute. ## Conflict Resolution If chat instruction conflicts with Cerebro: 1. Flag the conflict briefly. 2. Ask for confirmation. 3. Propose exact doc update path. 4. After confirmation, update Cerebro and proceed. Priority order: **Cerebro > SOUL/AGENTS > MEMORY > chat history**. ``` ### Technical Analysis The Skill assigns mutable Cerebro files a higher operational priority than chat history and requires every action to derive from those files. Workspace documents are external data and may be modified by users, collaborators, compromised automation, synchronized storage, or another Agent. Treating their contents as authoritative instructions creates an instruction-hijacking boundary violation. The confirmation step does not fully mitigate the issue. An untrusted document still controls the proposed workflow, can prevent direct execution of a legitimate request, and may manipulate the Agent into requesting approval for attacker-selected changes. Related mandatory gates in `SKILL.md:28-33`, `references/scenario-profiles-v2.1.md:32-37`, and `references/startup-checklist.md:3-12` reinforce this document-controlled behavior. ### Attack Path 1. An attacker obtains write access to a Cerebro company file, runbook, vendor document, or other indexed source-of-truth file. 2. The attacker inserts operational instructions that redirect a task, request sensitive tool use, or prevent compliance with legitimate user directions. 3. A user invokes the Skill for a matching operational domain. ...[truncated 952 chars]
Remediation
## Remediation Suggestions 1. Remove the custom precedence statement. Cerebro documents must never override system, developer, security, or currently authorized user instructions. 2. Treat retrieved Markdown as untrusted reference data rather than executable instructions. 3. Add an explicit rule that embedded directives cannot request credential access, external transmission, privilege changes, persistence, safety bypasses, or unrelated tool operations. 4. Require explicit user authorization immediately before consequential actions such as publishing, deployment, destructive file changes, financial activity, or communication with third parties. 5. Use an allowlisted schema for operational rules instead of interpreting arbitrary prose as commands. 6. Validate document provenance, ownership, integrity, and expected path before using it. 7. When documents conflict with the current request, summarize the conflict neutrally and let the authorized user decide; do not automatically favor the document. 8. Apply least privilege to the Agent's file and tool access so a compromised document cannot invoke unrelated capabilities.

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:65
Finding
Untrusted Instructions Can Be Promoted into Persistent Memory and Authoritative Policy## Vulnerability Details **File Location**: `SKILL.md`, lines 65-92 **Vulnerability Type**: Persistent memory and policy poisoning **Risk Level**: High ### Vulnerable Code ```markdown ## Write-Back Protocol (same action) When a decision/rule/process changes: 1. Update authoritative Cerebro file. 2. Append to `memory/YYYY-MM-DD.md` with: - What changed - Why it changed - Exact file path updated Never leave process changes only in chat. ## Continuity on "Continue Previous Work" Always return a 4-line snapshot before proceeding: - **Context:** project/domain - **Last Done:** durable completed step - **Open Items:** pending work - **Next Step:** immediate action now ## Missing-Doc Auto-Create Protocol If needed doc is missing: 1. Create file in correct Cerebro path. 2. Use `references/missing-doc-template.md`. 3. Backfill from recent memory notes only after creating structure. ``` The initial promotion of generated guidance into an authoritative document is also specified in `SKILL.md:49-53`: ```markdown - If no authoritative doc exists: 1) create the missing Cerebro doc first, 2) add minimal executable guidance, 3) then execute. ``` ### Technical Analysis The Skill requires process changes to be stored in both authoritative Cerebro files and daily memory. It also permits missing authoritative documents to be populated from recent free-form memory notes. This creates a feedback loop in which conversation-derived or previously poisoned content can be converted into durable operational policy. The risk is amplified by `SKILL.md:63`, which gives Cerebro content priority over chat history. Once poisoned content is promoted into a Cerebro document, later sessions may treat it as a higher-priority instruction source. The behavior is reinforced by: - `references/cerebro-index-v2.1.md:39-44` - `references/domain-routing-v2.1.md:16-22` - `references/enforcement-checklist-v2.1.md:20-22` - `references/scenario-profiles-v2.1.md:32-37` The proje ...[truncated 1694 chars]
Remediation
## Remediation Suggestions 1. Do not automatically convert conversation content or memory notes into executable policy. 2. Separate factual continuity notes from policy files, and explicitly state that memory content is non-authoritative. 3. Require informed user approval for each persistent rule change, showing the exact proposed diff and destination path. 4. Prohibit backfilling authoritative instructions from free-form memory. Use trusted templates and independently verified facts instead. 5. Record provenance metadata for every policy entry, including author, source, timestamp, reviewer, approval state, and integrity hash. 6. Constrain writes to an allowlisted workspace root and reject path traversal, symlinks, or unexpected destinations. 7. Sanitize stored content and reject directives involving secrets, external transmission, privilege escalation, persistence, destructive actions, or safety-policy changes. 8. Add versioning and rollback support so poisoned policy changes can be identified and reverted. 9. Require revalidation of stored policy against the current user's authorization and current security constraints before every use. 10. Prevent generated or memory-derived documents from receiving a higher instruction priority than the current authorized request.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Ae1

High
Category
analysis-evasion
Content
- Domain `COMPANY.md` first (if present), then the most specific `SKILL.md`/runbook.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Session Persistence

Medium
Category
Rogue Agent
Content
cp -r cerebro-openclaw-memory-boost-kb ~/.openclaw/skills/cerebro-first
```

Create your first knowledge doc:

```bash
mkdir -p ~/.openclaw/skills/cerebro-first/knowledge/prds
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
94% confidence
Finding
The skill description is broadly scoped to common operational prompts such as resuming work, making decisions, or executing project tasks, which can cause the skill to activate in many routine conversations without strong user intent. Because the skill then mandates reading and writing authoritative docs and memory, accidental invocation can steer agent behavior and trigger persistent changes beyond what the user explicitly requested.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The write-back protocol requires updating authoritative files and daily memory during the same action, but it does not require explicit user awareness or approval for those persistent modifications. This is dangerous because a routine operational exchange could silently alter source-of-truth documents, introduce incorrect rules, or poison future agent context across sessions.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The missing-doc protocol directs the agent to automatically create new files whenever guidance is missing, again without a user-facing warning or approval step. In context, this amplifies risk because absence of documentation becomes a trigger for persistent state creation, allowing accidental or adversarial prompts to seed new authoritative content that later workflows may trust.

Static analysis

No suspicious patterns detected.