CVE-2025-68668: N8n N8n Vulnerable To Arbitrary Command Vulnerability

CRITICAL
Advisory Identifier: GHSA-62r4-hw23-cc8v
CVSS 9.9
CWE-693
Published
Advisory Summary

CVE-2025-68668 is a CRITICAL (CVSS 9.9) n8n vulnerable to arbitrary command vulnerability (CWE-693: Protection Mechanism Failure) affecting N8n libraries in the npm ecosystem. The issue involves n8n vulnerable to arbitrary command execution in pyodide based python code node. Remediation is available by upgrading affected packages to version 2.0.0.

CVE-2025-68668 at a Glance

CVE Identifier CVE-2025-68668
GHSA Identifier GHSA-62r4-hw23-cc8v
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product N8n
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2025-68668

To remediate this vulnerability, upgrade all affected N8n dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

n8n fixed: 2.0.0
npm install n8n@2.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls n8n

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-68668, inspect your project dependencies using npm:

npm ls n8n

Analyze the terminal output to locate any version of N8n in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.

Note: The npm ls n8n command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In N8n, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A sandbox bypass vulnerability exists in the Python Code Node that uses Pyodide. An authenticated user with permission to create or modify workflows can exploit this vulnerability to execute arbitrary commands on the host system running n8n, using the same privileges as the n8n process. ### Patches In n8n version 1.111.0, a task-runner-based native Python implementation was introduced as an optional feature, providing a more secure isolation model. To enable it, you need to configure the `N8N_RUNNERS_ENABLED` and `N8N_NATIVE_PYTHON_RUNNER` environment variables. This implementation became the default starting with n8n version 2.0.0. ### Workarounds - Disable the Code Node by setting the environment variable `NODES_EXCLUDE: "[\"n8n-nodes-base.code\"]"` ([Docs)](https://docs.n8n.io/hosting/securing/blocking-nodes/) - Disable Python support in the Code node by setting the environment variable `N8N_PYTHON_ENABLED=false`, which was introduced in n8n version 1.104.0. - Configure n8n to use the task runner based Python sandbox via the `N8N_RUNNERS_ENABLED` and `N8N_NATIVE_PYTHON_RUNNER` environment variables. ([Docs](https://docs.n8n.io/hosting/configuration/task-runners/)) ### Resources - n8n documentation: [Blocking access to nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/) - n8n documentation: [Code Node (Python)](https://docs.n8n.io/code/code-node/#python-native) - n8n documentation: [Task Runners](https://docs.n8n.io/hosting/configuration/task-runners/)

CVE-2025-68668 Affected N8n Versions

1 component(s)
Fixed Versions:
2.0.0
Product / Package Ecosystem Affected Versions Fixed Version
n8n
npm
≥ 1.0.0
< 2.0.0
2.0.0

References

Frequently Asked Questions

What is CVE-2025-68668?
CVE-2025-68668 is a security vulnerability in N8n involving n8n Vulnerable to Arbitrary Command Execution in Pyodide based Python Code Node under CWE-693: Protection Mechanism Failure.
Which N8n versions are affected?
Affected versions include releases prior to 2.0.0 across affected packages: n8n.
What version fixes CVE-2025-68668?
Upgrading to 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is n8n affected?
Yes, n8n is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What is the CVSS score of CVE-2025-68668?
CVE-2025-68668 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L.
What CWE is associated with CVE-2025-68668?
CVE-2025-68668 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check npm dependencies for CVE-2025-68668?
Run the dependency tree command: 'npm ls n8n'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-62r4-hw23-cc8v",
  "modified" : "2026-01-05T19:06:05Z",
  "published" : "2025-12-26T18:18:05Z",
  "aliases" : [ "CVE-2025-68668" ],
  "summary" : "n8n Vulnerable to Arbitrary Command Execution in Pyodide based Python Code Node ",
  "details" : "### Impact\nA sandbox bypass vulnerability exists in the Python Code Node that uses Pyodide.\n\nAn authenticated user with permission to create or modify workflows can exploit this vulnerability to execute arbitrary commands on the host system running n8n, using the same privileges as the n8n process.\n\n### Patches\nIn n8n version 1.111.0, a task-runner-based native Python implementation was introduced as an optional feature, providing a more secure isolation model.\n\nTo enable it, you need to configure the `N8N_RUNNERS_ENABLED` and `N8N_NATIVE_PYTHON_RUNNER` environment variables.\n\nThis implementation became the default starting with n8n version 2.0.0.\n\n### Workarounds\n- Disable the Code Node by setting the environment variable `NODES_EXCLUDE: \"[\\\"n8n-nodes-base.code\\\"]\"` ([Docs)](https://docs.n8n.io/hosting/securing/blocking-nodes/)\n- Disable Python support in the Code node by setting the environment variable `N8N_PYTHON_ENABLED=false`, which was introduced in n8n version 1.104.0.\n- Configure n8n to use the task runner based Python sandbox via the `N8N_RUNNERS_ENABLED` and `N8N_NATIVE_PYTHON_RUNNER` environment variables. ([Docs](https://docs.n8n.io/hosting/configuration/task-runners/))\n\n### Resources\n- n8n documentation: [Blocking access to nodes](https://docs.n8n.io/hosting/securing/blocking-nodes/)\n- n8n documentation: [Code Node (Python)](https://docs.n8n.io/code/code-node/#python-native)\n- n8n documentation: [Task Runners](https://docs.n8n.io/hosting/configuration/task-runners/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "n8n"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/n8n-io/n8n/security/advisories/GHSA-62r4-hw23-cc8v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-68668"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/n8n-io/n8n"
  }, {
    "type" : "WEB",
    "url" : "https://www.smartkeyss.com/post/cve-2025-68668-breaking-out-of-the-python-sandbox-in-n8n"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-693" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-26T18:18:05Z",
    "nvd_published_at" : "2025-12-26T22:15:52Z"
  }
}