Back to plugin

Security audit

OpenViking

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this plugin suspicious because scanners report that conversation and tool content may bypass configured capture limits, and retrieved memories may influence system instructions without a clear trust boundary.

Before installing, consider whether you are comfortable with conversation and tool content being sent to the configured OpenViking backend despite capture settings, and with retrieved memories being placed in system-prompt additions. The scan was static and did not demonstrate exploitation, so treat its evidence as incomplete about runtime behavior.

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)

other

Warning
Location
plugin/dist/services/context-lifecycle-service.js:634
Finding

Automatic capture does not enforce configured filtering and length restrictions ## Remediation Suggestions 1. Apply the configured capture decision before constructing or transmitting outgoing text parts. Ensure both `captureMode` and `captureMaxLength` affect the active lifecycle path. 2. Define whether the maximum applies per message or per turn, document that contract consistently, and enforce it locally before any network request. Add a separate byte limit for transport and resource protection. 3. Introduce explicit controls for capturing assistant messages, tool arguments, and tool outputs. Prefer disabling tool-content capture by default or limiting it to approved tools. 4. Redact sensitive fields and known credential patterns before transmission. Do not treat whitespace cleanup or metadata removal as secret redaction. 5. Keep session archival and semantic memory extraction policies distinct. If full transcript archival is required, disclose it explicitly rather than presenting extraction filters as transmission controls. 6. Add transport-level regression tests proving that nonmatching keyword text, oversized content, and disabled tool-content categories never reach the HTTP client.

Content
View full analysis

Vulnerability Details

File Location:

  • plugin/dist/services/context-lifecycle-service.js:634–693
  • plugin/dist/text-utils.js:292–376
  • plugin/dist/client.js:378–397

Vulnerability Type: Ineffective data-capture controls / excessive data transmission
Risk Level: Medium

Vulnerable Code

The lifecycle handler extracts captured messages without providing the configured capture mode or maximum length:

js
const { messages: extractedMessagesRaw, newCount } = extractNewTurnMessages(messages, start);
const extractedMessages = coalesceConsecutiveToolMessages(extractedMessagesRaw);

It constructs outgoing message parts and transmits them without enforcing either setting:

js
const ovParts = msg.parts.map((part) => {
    if (part.type === "text") {
        const cleaned = part.text
            .replace(/<relevant-memories>[\s\S]*?<\/relevant-memories>/gi, " ")
            .replace(/\s+/g, " ")
            .trim();
        return { type: "text", text: cleaned };
    }
    return {
        type: "tool",
        tool_id: part.toolCallId,
        tool_name: part.toolName,
        tool_input: part.toolInput,
        tool_output: part.toolOutput,
        tool_status: part.toolStatus,
    };
});
if (ovParts.length > 0) {
    await client.addSessionMessage(ovSessionId, msg.role, ovParts, undefined, createdAt, resolveOpenVikingMessagePeerId({
        peerRole: cfg.peer_role ?? "none",
        role: msg.role,
        senderPeerId: senderRoleId,
        assistantPeerId: agentId,
    }));
}

Technical Analysis

The plugin exposes captureMode and captureMaxLength as configuration controls. Its manifest describes keyword-based filtering and a maximum sanitized user-text length for automatic capture.

However, the active after-turn capture path does not consume either setting. Although getCaptureDecision() implements keyword and length checks, extractNewTurnMessages() does not call it. Instead, it sanitizes message text and collects tool ...[truncated 2329 chars]

MCP06

Warning
Location
plugin/dist/services/context-lifecycle-service.js:286
Finding

Retrieved memory is inserted into system-prompt additions without trust isolation ## Remediation Suggestions 1. Keep retrieved profiles and memories out of privileged system-instruction channels where the host supports a separate reference-data mechanism. 2. Add explicit trusted instructions stating that retrieved content is untrusted evidence: it cannot override system, developer, or current-user instructions, authorize actions, or waive approval requirements. 3. Encode or escape structural delimiters before interpolation. Treat delimiter escaping as defense in depth, not as a complete prompt-injection mitigation. 4. Preserve provenance, including source URI, ownership, and origin. Distinguish verified user preferences from shared resources and automatically extracted content. 5. Enforce ownership and write authorization for profiles and memories, and provide mechanisms to inspect, quarantine, and delete poisoned entries. 6. Require independent authorization for sensitive actions such as local-file uploads, credential access, destructive changes, and external transmission. Retrieved instructions must not satisfy that authorization. 7. Add adversarial tests covering forged tags, conflicting instructions, poisoned profiles, cross-turn memory poisoning, and attempts to trigger sensitive tools.

Content
View full analysis

Vulnerability Details

File Location:

  • plugin/dist/services/context-lifecycle-service.js:217–237 — profile construction
  • plugin/dist/services/context-lifecycle-service.js:286–293 — insertion into system-prompt additions
  • plugin/dist/auto-recall.js, function buildRecallContextBlock() — recalled-content wrapping

Vulnerability Type: Indirect prompt injection / trust-boundary violation
Risk Level: Medium

Vulnerable Code

The profile-construction path inserts backend-provided text directly into a prompt block:

js
const capped = text.length > PROFILE_MAX_CHARS
    ? `${text.slice(0, PROFILE_MAX_CHARS).trimEnd()}\n... [profile truncated]`
    : text;
return `<user-profile uri="${uris[i]}">\n${capped}\n</user-profile>`;

The main assembly path combines the profile and recalled-memory blocks into systemPromptAddition:

js
const baseTokens = estimateTextTokens(assembled.systemPromptAddition ?? "");
for (const blocks of [[profileBlock, recallBlock], [profileBlock], [recallBlock]]) {
    if (!blocks.some(Boolean))
        continue;
    const systemPromptAddition = [assembled.systemPromptAddition, ...blocks].filter(Boolean).join("\n\n");
    const estimatedTokens = assembled.estimatedTokens + estimateTextTokens(systemPromptAddition) - baseTokens;
    if (estimatedTokens <= params.tokenBudget)
        return { ...assembled, systemPromptAddition, estimatedTokens };
}

Recalled content receives a source marker but no instruction-isolation guidance:

js
export function buildRecallContextBlock(memoryLines) {
    return [
        "<relevant-memories>",
        AUTO_RECALL_SOURCE_MARKER,
        "The following OpenViking memories may be relevant:",
        ...memoryLines,
        "</relevant-memories>",
    ].join("\n");
}

Technical Analysis

Profiles and recalled memories are data returned by the configured backend. They may originate from previously stored conversations, memory writes, or enabled shared resources.

The pl ...[truncated 2414 chars]

SkillSpector findings are pending for this release.

Endor dependency reachability

Checked Nov 16, 2026 · 9:34 AM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.