Vulnerabilities

Critical N8n Sandbox Escape Could Lead to Server Compromise

The vulnerability could allow attackers to execute arbitrary commands and steal credentials and other secrets.

AI attack

A critical sandbox escape vulnerability in the n8n AI workflow automation platform could allow attackers to execute arbitrary commands on the server, Pillar Security reports.

Tracked as CVE-2026-25049 (CVSS score of 9.4), the issue impacts the manner in which the n8n sandbox’s sanitization routine evaluates JavaScript expressions.

Pillar discovered that the sandbox’s sanitizer could be bypassed via JavaScript expressions that contained properties with a template literal, and via arrow functions and specific stack frame objects that would return real global objects.

These weaknesses in implementation allowed the security firm to escape the n8n sandbox and achieve command execution on the server.

The attack, Pillar says, led to full server compromise, allowing access to all environment variables, stored credentials, API and cloud keys, OAuth tokens, and configuration files.

Armed with the compromised secrets, an attacker could access connected cloud accounts, hijack AI pipelines and redirect traffic, and access internal services on n8n cloud instances.

Advertisement. Scroll to continue reading.

According to Pillar, a successful attack could be mounted by creating or modifying a workflow with parameters containing crafted expressions.

“The entire attack fits inside what looks like a data transformation. No special permissions required. No admin access – just a user who can edit workflows,” Pillar notes.

The company reported the bug to n8n on December 21 and a fix was rolled out two days later, blocking template literals. The next day, Pillar discovered that the patch could be bypassed using function arguments, which are not sanitized.

“The root cause in both cases: incomplete AST analysis. The sanitizer made assumptions about how JavaScript code would be written, and we found ways to express the same operations differently,” Pillar notes.

Both the initial vulnerability and its bypass were properly addressed in n8n version 2.4.0, Pillar says. Users are advised to update their instances as soon as possible.

Related: N8n Vulnerabilities Could Lead to Remote Code Execution

Related: Cisco, F5 Patch High-Severity Vulnerabilities

Related: Chrome 144, Firefox 147 Patch High-Severity Vulnerabilities

Related: Critical Vulnerability Patched in jsPDF

Related Content

Artificial Intelligence

Xint says a flaw in OpenAI’s compaction process let researchers move reasoning traces between models, potentially making it cheaper to distill a rival AI.

Vulnerabilities

Attackers successfully exploited the PHP2Shell flaws against honeypots, launching 35 shells from two IP addresses on October 24.

Vulnerabilities

An out-of-bounds write in Google’s Brotli decoder affects Node.js, .NET, PowerShell, and Python packages, and can lead to code execution.

Artificial Intelligence

The model engaged in severe overreach and dishonesty, creating fake identities and submitting malicious code on GitHub.

Vulnerabilities

Researchers tie PHP2Shell attempts to a Mirai botnet and show an ASLR bypass, but no successful compromise has been confirmed yet.

Artificial Intelligence

The state-sponsored hackers targeted hundreds of organizations and gained privileged access to some environments.

Vulnerabilities

The critical-severity SQL injection flaw allows attackers to access privileged internal functionality and gain operator privileges.

Artificial Intelligence

Hackers used compromised GitHub CLI OAuth tokens to push and approve malicious packages on PyPI and Docker.

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version