Back to plugin

Security audit

Filament

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this plugin suspicious because it found remote instructions entering the agent’s system-prompt context and unrestricted attachment downloads that could reach internal network services.

Consider whether you trust the configured Filament service to influence the agent’s high-priority instructions, and whether the gateway can reach sensitive internal services. The verdict is suspicious because of these reported security weaknesses; the scan does not demonstrate successful exploitation or establish malicious intent.

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
dist/src/mcp-client.js:377
Finding

Unrestricted attachment download URLs permit gateway-side SSRF ## Remediation Suggestions 1. Replace the direct fetch with an SSRF-protected download implementation. 2. Require HTTPS and restrict download destinations to explicitly approved origins or a narrowly scoped deployment-specific allowlist. 3. Validate resolved IPv4 and IPv6 addresses, rejecting loopback, private, link-local, multicast, unspecified, and other prohibited ranges. 4. Bind connections to validated destinations to prevent DNS-rebinding bypasses. 5. Disable redirects by default. If redirects are necessary, validate every redirect URL and its resolved addresses before following it. 6. Permit private-deployment exceptions only through explicit administrator configuration. 7. Preserve existing timeout, size, and attachment-count limits, and add regression tests covering internal destinations, redirects, and DNS-based bypasses.

Content
View full analysis

Vulnerability Details

File Location: plugin/dist/src/mcp-client.js:377–383, signedMedia()
Vulnerability Type: Server-Side Request Forgery (CWE-918)
Risk Level: Medium

Vulnerable Code

js
const url = typeof data.download_url === "string" ? data.download_url : "";
if (!/^https?:\/\//.test(url))
  throw new Error("get_media_download_url returned no download_url");
const signals = [AbortSignal.timeout(opts?.timeoutMs ?? MEDIA_TIMEOUT_MS)];
if (opts?.signal) signals.push(opts.signal);
return await this.fetchImpl(url, { method: "GET", signal: AbortSignal.any(signals) });

Technical Analysis

The plugin retrieves an attachment URL from the remote get_media_download_url tool and validates only its HTTP(S) scheme. It then requests that URL directly from the gateway process.

There is no destination allowlist, private-address filtering, or explicit redirect validation. Consequently, a malicious or compromised API can direct attachment downloads toward loopback, private-network, or link-local destinations reachable by the gateway. The direct fetch bypasses the host media-loading abstraction used elsewhere for outbound media.

The request does not include the Filament bearer token. Download size, timeout, and attachment-count limits constrain resource consumption but do not prevent requests to sensitive destinations.

This behavior is established by static inspection. Attacker control of the API response is a prerequisite; the reviewed code does not establish that an ordinary chat participant can choose the returned URL.

Attack Path

  1. The attacker controls the configured Filament API or compromises its responses.
  2. The API supplies a work item containing an attachment with a message identifier.
  3. Automatic inbound-media processing requests a URL through get_media_download_url.
  4. The attacker returns an HTTP(S) URL targeting a gateway-accessible internal service.
  5. signedMedia() accepts the URL and performs a GET request f ...[truncated 931 chars]

MCP06

Warning
Location
dist/src/mcp-client.js:151
Finding

Remote API instructions are promoted into the agent’s system-prompt context ## Remediation Suggestions 1. Remove free-form remote initialization instructions from `GroupSystemPrompt` and other privileged instruction fields. 2. Keep operational instructions local, version-controlled, and subject to code review. 3. Represent remote capabilities as strictly validated structured fields, then generate any necessary guidance from fixed local templates. 4. If remote guidance must be displayed, place it in an explicitly untrusted external-data context rather than treating it as authoritative instructions. 5. Enforce sensitive-action authorization outside the model, including filesystem access, credential access, external transmission, and privileged tool calls. 6. If remote system-prompt authority is deliberately supported, make it an explicit administrator opt-in and document its gateway-level trust implications. 7. Add regression tests demonstrating that arbitrary initialization text cannot enter privileged prompt fields.

Content
View full analysis

Vulnerability Details

File Location:

  • plugin/dist/src/mcp-client.js:151–152 — accepts remote initialization instructions.
  • plugin/dist/src/onboarding-core.js:37–45 — retains most remote instruction text.
  • plugin/dist/src/channel.js:262–264 — passes that text as systemPrompt.
  • plugin/dist/src/turn.js:121 — assigns it to GroupSystemPrompt.

Vulnerability Type: Prompt Injection / Improper Separation of External Data and Instructions
Risk Level: Medium

Vulnerable Code

Remote instruction ingestion:

js
const instr = json?.result && typeof json.result === "object" ? json.result.instructions : void 0;
this.instructions = typeof instr === "string" ? instr : null;

Instruction transformation:

js
function turnInstructions(instructions, opts = {}) {
  const attachments = attachmentsGuidance(opts.signedMedia === true);
  const paragraphs = (typeof instructions === "string" ? instructions.split("\n\n") : []).filter((paragraph) => !paragraph.trimStart().startsWith("First contact:")).map(
    (paragraph) => paragraph.trimStart().startsWith("Attachments:") ? attachments : paragraph
  ).filter((paragraph) => paragraph.trim());
  if (!paragraphs.includes(attachments)) paragraphs.push(attachments);
  return paragraphs.join("\n\n").trim();
}

Propagation into the turn:

js
systemPrompt: turnInstructions(connection?.client.instructions, {
  signedMedia: signedMediaOffered(connection?.client.toolNames)
}),

Assignment to the system-prompt field:

js
...params.systemPrompt ? { GroupSystemPrompt: params.systemPrompt } : {},

Technical Analysis

The plugin accepts free-form instructions from the MCP initialization response. Its transformation removes paragraphs beginning with First contact: and replaces paragraphs beginning with Attachments:, but otherwise retains the supplied text.

The retained content is passed as systemPrompt and assigned to GroupSystemPrompt. The reviewed turn implementation explicitly not ...[truncated 2150 chars]

SkillSpector findings are pending for this release.

Endor dependency reachability

Checked Nov 20, 2026 · 8:19 PM UTC

No reachable vulnerabilities reported

Endor dependency scan completed.