Back to skill

Security audit

N8n 1.0.2

Security checks for vulnerabilities and agentic risk

Overview

This n8n skill mostly matches its stated purpose, but it needs review because it can change or trigger automations and has weak safeguards around API-key use.

Review before installing. Use a least-privilege n8n API key, configure only an HTTPS n8n base URL you control, avoid storing the key in synced dotfiles when possible, and require explicit human approval before activating, deactivating, deleting, or manually executing workflows because those actions may affect connected systems.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/n8n_api.py:19
Finding

API Key Exposure Through Unvalidated Transport and Redirects

Content
View full analysis
Dict[str, Any]: """Make API request""" url = f"{self.base_url}/api/v1/{endpoint.lstrip('/')}" response = self.session.request(method, url, **kwargs) ``` ### Technical Analysis The client obtains `N8N_BASE_URL` from an environment variable without validating its scheme, hostname, port, or embedded credentials. It then places the n8n API key in a persistent session header and sends requests to the resulting URL. Consequently, an `http://` base URL causes the API key and API traffic to be transmitted without transport encryption. An attacker able to observe or modify the network path could capture the key or alter API responses. The `requests` library also follows redirects by default. Because the API key is stored in the custom `X-N8N-API-KEY` session header, a redirect may cause sensitive credentials to cross the originally configured trust boundary. The implementation does not disable redirects or verify that redirect destinations retain the expected HTTPS scheme and trusted origin. ### Attack Path 1. A user configures an HTTP n8n URL, or an attacker modifies the `N8N_BASE_URL` environment variable. 2. The client constructs an API URL directly from that value. 3. The client attaches the `X-N8N-API-KE ...[truncated 1038 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependency Permits Non-Reproducible Installation

Content
View full analysis
=2.28.0 ``` The documented installation procedure executes: ```bash pip install -r requirements.txt ``` ### Technical Analysis The lower-bound-only constraint permits installation of any current or future `requests` release satisfying the specified minimum version. Transitive dependencies are also not locked, and no package hashes are supplied. As a result, separate installations can resolve to different dependency versions. The project cannot reliably verify that installed artifacts are the same versions reviewed or tested by its maintainers. If a permitted package release or package-index account is compromised, a malicious release satisfying the version range could be selected during installation. This finding does not establish that the current `requests` package is malicious. It identifies the absence of controls that constrain and authenticate the dependency set. ### Attack Path 1. An attacker compromises a package release, publishing account, package index, or dependency distribution channel used by the installation environment. 2. A malicious version satisfying `requests>=2.28.0`, or a malicious compatible transitive dependency, becomes available. 3. A user follows the documented setup procedure and runs `pip install -r requirements.txt`. 4. Dependency resolution selects the compromised version because no exact version or artifact hash is required. 5. Malicious package installation or runtime code executes with the privileges of the user running the setup or n8n client. 6. That code may access the process environment, including `N8N_API_KEY`, or modify behavior and files available to that user. ### Impact Assessment A compromised dependency executes within the Python process and therefore receives the same operating-system privileges a ...[truncated 451 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill exposes capabilities that rely on environment variables and outbound network access, but it does not declare any explicit tool scope or permissions boundary. That omission increases the chance an agent can use the skill with broader-than-expected access, making credential use and remote API actions less transparent and harder to govern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation encourages activating, deactivating, and manually executing workflows without warning about production impact, downstream side effects, or the need for operator confirmation. In an automation platform, these actions can send emails, modify data, trigger integrations, or disrupt critical business processes, so omitting safety guidance materially increases operational risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file documents irreversible delete operations (DELETE /workflows/{id}) without warning that they can remove user data or require care before use. Under the markdown-specific warning criteria, destructive behaviors that affect user data or system integrity should be accompanied by an explicit warning.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The reference includes DELETE /executions/{id} but does not warn users that deleting execution records may permanently remove audit or run-history data. For markdown skill documentation, omission of warnings around destructive actions affecting user data is a reportable issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill documents manual workflow execution but provides no warning that triggering a workflow can cause real side effects such as sending messages, modifying records, or invoking external systems. In the context of an automation platform, encouraging execution without highlighting side effects increases the chance an agent or user will trigger impactful operations unsafely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exposes destructive and administrative actions beyond the manifest’s stated scope, including deleting workflows/executions and creating/updating workflows. This mismatch increases the chance that a caller or higher-level agent invokes sensitive operations without appropriate scrutiny, violating least privilege and creating an integrity risk for automation assets.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The CLI allows activation, deactivation, and manual execution of workflows immediately when called, with no interactive confirmation, warning, dry-run mode, or higher-level safety checks. In an agent skill context, this is more dangerous because automated or prompt-influenced invocations can cause unintended operational changes or trigger downstream side effects in connected systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The setup instructions advise storing the n8n API key in shell startup files but do not warn that these files may be broadly readable, long-lived, or inadvertently exposed through backups, dotfile syncing, shell history, or debugging output. This increases the risk of credential leakage and unauthorized access to workflow management APIs.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency is specified as requests>=2.28.0, which permits installation of many future and past versions rather than a reviewed, fixed release. This weakens supply-chain control and reproducibility, and in an automation skill that makes API calls, an affected or behavior-changing version of requests could introduce security regressions or break trust assumptions.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Because requests is not pinned, it is impossible to verify from this manifest whether the installed version includes fixes for known advisories affecting the library. In the context of an n8n management skill that likely handles API endpoints, credentials, and workflow data, unresolved requests flaws could contribute to credential leakage, insecure request handling, or other client-side security issues depending on the deployed version.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The module docstring says it manages workflows, executions, and credentials via the n8n REST API, but the manifest description only covers workflows, executions, automation tasks, triggering, and debugging. Even though no credential-management methods appear in this file, the documented intent is broader than the manifest's stated scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.