Back to skill

Security audit

Correction Memory

Security checks for vulnerabilities and agentic risk

Overview

This skill openly provides local correction memory, but it stores free-form text and replays it as future agent instructions without enough controls.

Install only if you are comfortable with local, cross-session agent memory. Do not log secrets, private context, or broad behavioral instructions as corrections, and review or delete memory/corrections entries before using this with higher-privilege agents or shared workspaces.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (1)

T02 · Agent Memory Poisoning

Error
Location
references/correction-tracker-template.js:62
Finding

Persistent Prompt Injection Through Attacker-Controlled Correction Memory

Content
View full analysis
MAX_CONTENT_LEN) { throw new Error(`${fieldName} exceeds max length of ${MAX_CONTENT_LEN}`); } return sanitized; } ``` `logCorrection` accepts this free-form content and writes it into persistent, agent-specific storage: ```javascript function logCorrection(agentType, issue, correction, workspaceRoot, opts = {}) { if (!workspaceRoot) throw new Error('logCorrection: workspaceRoot is required'); const entry = { ts: new Date().toISOString(), issue: _sanitizeContent(issue, 'issue'), correction: _sanitizeContent(correction, 'correction'), session_channel: _sanitizeContent(opts.session_channel || 'unknown', 'session_channel'), applied_count: 0 }; const existing = _readAll(agentType, workspaceRoot); existing.push(entry); _writeAll(agentType, workspaceRoot, existing); return entry; } ``` The persisted values are then interpolated directly into an authoritative instruction preamble: ```javascript ...[truncated 4392 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 (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The core declared theme—persisting corrections for reuse across sessions—matches the library’s main functionality. However, the description claims an end-to-end skill that automatically injects corrections into future spawns and installs both the correction-tracker library and an injection hook into agent-context-loader. The supplied code only provides helper functions for logging, reading, formatting, and marking corrections; consumers must manually call buildCorrectionPreamble and prepend it to prompts. There is no code that modifies spawn flows, patches loaders, or performs installation. This is a material description/behavior mismatch because the declared primary operational capability is automation and integration, while the actual code is only a supporting library.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

md
cp references/correction-tracker-template.js $OPENCLAW_WORKSPACE/lib/correction-tracker.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 115)May include surrounding context.

md
cp references/correction-tracker-template.js $OPENCLAW_WORKSPACE/lib/correction-tracker.js

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill persistently stores user corrections to workspace files and later re-injects them into future agent prompts, but it does not warn that those corrections may contain sensitive data, secrets, internal instructions, or private context. This creates a durable prompt/data-retention channel that can unintentionally preserve and propagate sensitive information across sessions and agent runs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language command encourages users to submit corrections in free text without warning that the quoted content will be stored and automatically injected into future agent spawns. That makes it easy to accidentally persist secrets or to plant durable prompt-injection content disguised as a correction, which can influence later agent behavior across sessions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This module is explicitly designed to persist free-text corrections across sessions and inject them into future agent prompts. Because the stored issue and correction text is later replayed verbatim, any secrets, sensitive user content, internal instructions, or prompt-injection text captured during one session can leak into later sessions for the same agent type.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

buildCorrectionPreamble formats and returns prior corrections directly into a new prompt with no filtering beyond basic control-character stripping. That means sensitive data or adversarial natural-language instructions embedded in prior corrections will be reproduced to future agent instances, creating cross-session data leakage and prompt-injection persistence.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.