Back to News
News

Critical n8n Flaws Let Attackers Run Code and Steal Stored Secrets

Critical n8n Flaws Let Attackers Run Code and Steal Stored Secrets

Cybersecurity teams have disclosed multiple critical vulnerabilities in the n8n workflow automation platform that could allow attackers to run commands on affected servers and decrypt credentials stored by the application.

What researchers found

Pillar Security researcher Eilon Cohen reported two high-severity bugs in n8n’s expression evaluation system: CVE-2026-27577, a sandbox escape in the expression compiler, and CVE-2026-27493, an unauthenticated expression evaluation issue tied to public Form nodes. “CVE-2026-27577 is a sandbox escape in the expression compiler: a missing case in the AST rewriter lets process slip through untransformed, giving any authenticated expression full RCE,” Cohen said.

n8n’s maintainers confirmed the problems and warned that CVE-2026-27493 is a “double-evaluation bug” that can be abused because Form endpoints are public by design and do not require authentication. n8n added that chaining a sandbox escape with the Form-node issue “could escalate to remote code execution on the n8n host.” n8n said fixes are available in versions 2.10.1, 2.9.3, and 1.123.22.

Pillar Security also warned that an attacker who succeeds could read the N8N_ENCRYPTION_KEY environment variable and decrypt credentials stored in the database, exposing AWS keys, database passwords, OAuth tokens, and API keys.

Separately, n8n noted two other critical bugs fixed in the same releases: CVE-2026-27495, a code injection in the JavaScript Task Runner sandbox, and CVE-2026-27497, a Merge node issue that could be used to execute code and write files. n8n recommended mitigations for each flaw in its advisories.

Unauthenticated RCE reported by Cyera and detection advice

Cyera Research Labs disclosed an unauthenticated remote code execution vulnerability tracked as CVE-2026-21858. Cyera said the issue affects Form and Webhook handling in some self-hosted n8n deployments and demonstrated how it can lead to arbitrary file reads, credential extraction, session forgery, and full system compromise. Cyera named that chain “Ni8mare.”

Aikido Security and other defenders have urged teams to inventory exposed Forms and Webhooks because automation platforms often hold wide access to APIs and secret tokens. Aikido said its tooling can help locate internet-exposed forms, vulnerable n8n versions, and risky workflow configurations.

Immediate actions and mitigations

  • Patch: n8n said to upgrade to the fixed releases (2.10.1, 2.9.3, 1.123.22) as the primary remedy.
  • Limit permissions: If you cannot patch immediately, n8n advised limiting who can create or edit workflows and running n8n with restricted OS privileges and network access.
  • Disable risky nodes: n8n suggested disabling Form and Merge nodes via the NODES_EXCLUDE environment variable and, for CVE-2026-27495, using external runner mode to reduce impact.
  • Rotate secrets: Pillar Security recommended rotating API keys, OAuth tokens, and other credentials stored by n8n if you were running vulnerable versions.

n8n maintainers cautioned: “These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.” Pillar Security and Cyera both urged operators of self-hosted instances to prioritize upgrades and audit any public Forms or Webhook endpoints.

Because automation platforms commonly hold broad access to services and secrets, researchers say these incidents underscore the need for prompt patching, minimal exposure of public entry points, and strict control over who can author workflows.

#n8n #RCE #Vulnerability #AutomationSecurity #Infosec