Safeguard
Vulnerability Analysis•

CVE-2026-25115: Critical Python Sandbox Escape in n8n

CVE-2026-25115 lets an authenticated n8n user escape the Python Code node sandbox (CVSS 9.9). Upgrade to 2.4.8 and run task runners in external mode.

Safeguard Security Team
3 min read

CVE-2026-25115 is a critical flaw (CVSS 9.9) in n8n, the workflow automation platform. An authenticated user can break out of the sandbox around the Python Code node and run code outside the intended boundary. n8n 2.4.8 fixes it. Upgrade, and consider external task runners to reduce what an escape can reach.

What's affected

  • Affected: n8n before 2.4.8.
  • Fixed in: 2.4.8 and later.

The advisory says the issue affects deployments where all of these hold:

  • Task runners are enabled, with the setting N8N_RUNNERS_ENABLED set to true. The default is false.
  • Python is enabled, with N8N_PYTHON_ENABLED set to true.
  • The Code node is enabled. This is the default.

The advisory adds that only authenticated users can run code through task runners. If the runner mode is external, which is not the default, the escape is limited to the sidecar container. The advisory says a lower high severity fits that case better.

How to check if you're exposed

Check the three settings on your deployment, along with the version.

docker exec <container> env | grep N8N_

Replace the container name with your own. Look for N8N_RUNNERS_ENABLED, N8N_PYTHON_ENABLED and N8N_RUNNERS_MODE. If runners or Python are off, you are outside the described condition, though you should still upgrade. Then count the users with permission to create workflows, because each is a possible author of malicious code.

What to do now

  1. Upgrade n8n to 2.4.8 or later.
  2. If you cannot upgrade, disable the Code node by adding n8n-nodes-base.code to the NODES_EXCLUDE environment variable. This is the advisory's first workaround.
  3. Run task runners in external mode, so untrusted code runs in a separate sidecar container rather than inside the main n8n process. This is the advisory's second workaround.
  4. Keep the sidecar container small, with no extra secrets and tight network rules.
  5. Review who can create and edit workflows, and remove access that is not needed.

Why it matters

Sandboxes are a promise that code can run without touching the host. The class is CWE-693 (Protection Mechanism Failure), protection mechanism failure. When the protection fails, the code runs with whatever rights the process has. That is why the advisory pushes external mode. If the escape happens in a sidecar, the blast radius is that sidecar.

The design lesson is to keep two boundaries. A language sandbox is one. A separate process or container is the other. Treat the first as a convenience and the second as the real wall.

Quick check

Am I affected if I never turned on task runners?

The advisory describes the affected deployments as ones with task runners and Python enabled, plus the Code node. Upgrade anyway so a settings change later does not reopen the hole.

Is it exploited in the wild?

The record does not mark it as a CISA Known Exploited Vulnerability, and the advisory does not report exploitation.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.