Back to skill

Security audit

MasterSwarm AI Document Analysis

Security checks for vulnerabilities and agentic risk

Overview

This skill is review-worthy because it sends broad, potentially sensitive documents to a third-party cloud API and includes an unsafe shell example that can execute local commands if used with untrusted input.

Install only if you are comfortable sending document text and prompts to the MasterSwarm/NeuroDoc cloud service. Avoid using it with secrets, credentials, confidential business files, regulated medical/legal/financial data, or hostile user-supplied text unless you add explicit review and safe JSON serialization instead of the provided shell substitution example.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:120
Finding

Shell Command Injection Through Unsafe User-Input Interpolation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 120–132
Vulnerability Type: Shell command injection caused by unsafe interpolation into a double-quoted JSON argument
Risk Level: High

Vulnerable Code

bash
# Example: Run apex + consult + research on the same query
for ENGINE_ID in apex consult research; do
  curl -s --max-time 120 -X POST https://api.neurodoc.app/aetherlang/execute \
    -H "Content-Type: application/json" \
    -H "X-Aether-Key: MASTERSWARM_API_KEY" \
    -d "{
      \"code\": \"flow M {\n  using target \\\"neuroaether\\\" version \\\">=0.2\\\";\n  input text query;\n  node G: guard mode=\\\"STANDARD\\\";\n  node E: $ENGINE_ID style=\\\"professional\\\";\n  G -> E;\n  output text result from E;\n}\",
      \"query\": \"USER_QUESTION\"
    }"
done

Technical Analysis

The multi-engine usage example instructs users or agents to replace USER_QUESTION with untrusted question text inside a shell double-quoted argument. Double quotes do not suppress shell command substitution. Consequently, constructs such as $(command) or backtick command substitution embedded in the question can be evaluated by the local shell before curl executes.

User input containing quotation marks, backslashes, or JSON control characters can also terminate or corrupt the intended JSON value. This creates both a shell-injection risk and unreliable JSON serialization. The remote API's guard node cannot prevent this issue because shell expansion occurs locally before the request reaches the API.

Attack Path

  1. An attacker supplies a document or question containing shell syntax such as $(attacker_command).
  2. An agent or user follows the documented multi-engine workflow and substitutes the supplied content directly for USER_QUESTION.
  3. The resulting content remains inside a shell double-quoted -d argument.
  4. The local shell evaluates the embedded command substitution before in ...[truncated 916 chars]
Remediation
View remediation

Remediation Suggestions

Do not construct JSON by substituting untrusted text into a shell-quoted string. Use a JSON serializer so all quotation marks, backslashes, control characters, and shell metacharacters are encoded as data.

A safer pattern is:

bash
CODE='flow M {
  using target "neuroaether" version ">=0.2";
  input text query;
  node G: guard mode="STANDARD";
  node E: apex style="professional";
  G -> E;
  output text result from E;
}'

jq -n \
  --arg code "$CODE" \
  --arg query "$USER_QUESTION" \
  '{code: $code, query: $query}' > request.json

curl -s --max-time 120 \
  -X POST https://api.neurodoc.app/aetherlang/execute \
  -H "Content-Type: application/json" \
  -H "X-Aether-Key: $MASTERSWARM_API_KEY" \
  --data-binary @request.json

Additional hardening measures:

  1. Prefer an HTTP SDK that accepts structured request objects rather than constructing requests through shell interpolation.
  2. Pass user input through environment variables, standard input, or files and then serialize it with a trusted JSON library.
  3. Never use eval, sh -c, or equivalent dynamic shell evaluation with document contents or user questions.
  4. Execute the connector with least privilege and provide only the credentials and filesystem access required for the request.
  5. Add tests containing command substitutions, backticks, quotes, backslashes, newlines, and JSON control characters to verify they remain inert data.
  6. Update both single-engine and multi-engine examples to consistently reference the API key through the environment variable rather than showing literal placeholder substitution.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises that it can analyze 'any document' and answer broad categories of questions, but it does not define clear invocation boundaries or routing constraints. In an agent environment, that overbreadth can cause the skill to be selected for sensitive or unrelated content and then transmit that content to a third-party service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
homepage: https://masterswarm.net
  skill_type: api_connector
  external_endpoints:
    - https://api.neurodoc.app/aetherlang/execute
  operator_note: "api.neurodoc.app and masterswarm.net are the same operator (NeuroDoc Pro, Hetzner DE)"
license: MIT
---

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The text says to send 'any text or question' to the API, which encourages unconstrained use and increases the chance that sensitive, regulated, or irrelevant data will be routed externally. Because this is an API connector, the broad phrasing materially raises the risk of accidental data disclosure through over-invocation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Although the file later mentions the API host and privacy claims, the core usage description does not give a prominent, immediate warning that submitted document text and questions are sent to an external third-party API. Users may therefore provide sensitive content without informed consent at the point where the skill is described as handling 'any text or question.'

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The presence of the external URL in the executable usage example confirms that live user content will be transmitted off-platform to a third-party service. In context, this is more dangerous because the skill invites analysis of potentially confidential documents and regulated subject matter while relying largely on operator privacy assertions.

Content

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

Single Engine Analysis

bash
curl -s --max-time 120 -X POST https://api.neurodoc.app/aetherlang/execute \
  -H "Content-Type: application/json" \
  -H "X-Aether-Key: MASTERSWARM_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The presence of the external URL in the executable usage example confirms that live user content will be transmitted off-platform to a third-party service. In context, this is more dangerous because the skill invites analysis of potentially confidential documents and regulated subject matter while relying largely on operator privacy assertions.

Content

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

Single Engine Analysis

bash
curl -s --max-time 120 -X POST https://api.neurodoc.app/aetherlang/execute \
  -H "Content-Type: application/json" \
  -H "X-Aether-Key: MASTERSWARM_API_KEY" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The repeated URL usage in the looped example demonstrates bulk or repeated off-platform submission behavior, which increases data exposure and operational risk. In this context, the broad allowed content categories make repeated transmission of sensitive business, legal, medical, or financial information especially concerning.

Content

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

bash
# Example: Run apex + consult + research on the same query
for ENGINE_ID in apex consult research; do
  curl -s --max-time 120 -X POST https://api.neurodoc.app/aetherlang/execute \
    -H "Content-Type: application/json" \
    -H "X-Aether-Key: MASTERSWARM_API_KEY" \
    -d "{

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The repeated URL usage in the looped example demonstrates bulk or repeated off-platform submission behavior, which increases data exposure and operational risk. In this context, the broad allowed content categories make repeated transmission of sensitive business, legal, medical, or financial information especially concerning.

Content

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

bash
# Example: Run apex + consult + research on the same query
for ENGINE_ID in apex consult research; do
  curl -s --max-time 120 -X POST https://api.neurodoc.app/aetherlang/execute \
    -H "Content-Type: application/json" \
    -H "X-Aether-Key: MASTERSWARM_API_KEY" \
    -d "{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest explicitly requires a cloud API key and describes uploading documents for remote analysis, but it provides no user-facing warning that submitted files and prompts will be transmitted to a third-party service. Because the skill targets sensitive categories such as receipts, contracts, medical, legal, and crypto documents, users may unintentionally expose confidential or regulated data without informed consent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.