Back to skill

Security audit

N8n

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent n8n management tooling, but its “dry-run” testing path can trigger real workflows and the docs under-warn about production side effects.

Install only if you are comfortable giving this skill API-level control over the configured n8n instance. Use a staging n8n URL and least-privilege API key where possible, and treat “dry-run” commands as real workflow execution until the skill is changed to simulate or require explicit confirmation.

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

Warning
Location
scripts/n8n_tester.py:187
Finding

Misleading Dry-Run Operation Executes the Workflow Against the Configured n8n Instance

Content
View full analysis

Vulnerability Details

File Location: scripts/n8n_tester.py, lines 187-199
Vulnerability Type: Unsafe test implementation with unintended external side effects
Risk Level: Medium

Complete Code Snippet

python
def dry_run(self, workflow_id: str, test_data: Dict = None, test_data_file: str = None) -> Dict:
    """Execute workflow with test data"""
    # Load test data if from file
    if test_data_file:
        with open(test_data_file, 'r') as f:
            test_data = json.load(f)

    print(f"Running workflow {workflow_id} with test data...")

    # Execute workflow
    execution_result = self.client.execute_workflow(workflow_id, data=test_data)
    execution_id = execution_result.get('data', {}).get('executionId')

The invoked client method also performs a real API request:

python
def execute_workflow(self, workflow_id: str, data: Dict = None) -> Dict:
    """Manually trigger workflow execution"""
    payload = {'workflowId': workflow_id}
    if data:
        payload['data'] = data
    return self._request('POST', f'workflows/{workflow_id}/execute', json=payload)

Technical Analysis

The operation is exposed as a “dry-run,” but it does not simulate, isolate, mock, or otherwise suppress workflow side effects. It calls execute_workflow, which sends a real authenticated POST request to the configured n8n instance and initiates the selected workflow.

This behavior is especially dangerous because the documentation recommends using dry-run testing before activation and describes it as testing with sample or mock data. An operator may therefore reasonably expect that the command cannot affect production systems. In practice, any nodes reached by the workflow can perform their normal actions, including:

  • Sending email or chat messages.
  • Creating or modifying database records.
  • Charging or interacting with payment systems.
  • Posting to external services.
  • Invoking webhooks and third-party APIs.
  • Deleting or altering ...[truncated 1900 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not describe real execution as a dry-run. Rename the current operation to an explicit name such as execute-test-data if real execution is intentional.
  2. Implement genuine isolation. A dry-run should clone the workflow into a dedicated test project or instance, replace side-effecting nodes with mocks, and use test-only credentials.
  3. Require an explicit opt-in for real execution. Add a flag such as --allow-real-execution and display the destination n8n URL and workflow identifier before sending the request.
  4. Protect production instances. Refuse dry-run operations against production URLs unless a separate override is supplied. Prefer a dedicated N8N_TEST_BASE_URL and test API key.
  5. Add node-level safety checks. Inspect the workflow before execution and block or prominently warn about email, payment, database-write, HTTP request, command, deletion, and other side-effecting nodes.
  6. Use least-privilege test credentials. Test workflows should not inherit production credentials and should only access sandbox accounts and disposable datasets.
  7. Correct the documentation. Clearly state that the existing command initiates a real workflow execution and may cause external side effects. Remove claims that imply mock execution until actual simulation exists.
  8. Add regression tests. Verify that the dry-run path cannot call the production execution endpoint and that side-effecting integrations are mocked or rejected.
Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (39)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This finding also reflects description-behavior mismatch, specifically that the skill performs optimization analysis, scoring, and report generation beyond the narrow management description. While less severe than hidden destructive actions, undocumented analytical behavior still expands the effective data access and processing surface, which can expose execution metadata or workflow internals without informed user consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This finding also reflects description-behavior mismatch, specifically that the skill performs optimization analysis, scoring, and report generation beyond the narrow management description. While less severe than hidden destructive actions, undocumented analytical behavior still expands the effective data access and processing surface, which can expose execution metadata or workflow internals without informed user consent.

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 69)May include surrounding context.

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/n8n_api.py list-workflows --pretty

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 67)May include surrounding context.

Delete Workflow

text
DELETE /workflows/{id}

Executions

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 101)May include surrounding context.

Delete Execution

text
DELETE /executions/{id}

Manual Execution