Sep 10, 2026·5 min read·14 visits
An authenticated user with workflow editing privileges can trigger exponential backtracking in n8n's file validation regular expression, blocking the single-threaded Node.js event loop and rendering the entire instance unavailable.
A Regular Expression Denial of Service (ReDoS) vulnerability exists in n8n due to inefficient validation in its default blocked-file-pattern matching mechanism. This flaw can be triggered during Git operations, allowing authenticated workflow editors to cause resource exhaustion and completely freeze the n8n application process.
The vulnerability is located in the default file-blocking pattern validation mechanism of the n8n workflow automation platform. This mechanism restricts nodes from accessing or modifying sensitive directories on the filesystem. Nodes that process user-defined paths, such as the Git node during a repository clone operation, evaluate paths against this blocklist before executing system commands.
The target validation pattern is defined globally via the N8N_BLOCK_FILE_PATTERNS configuration. Under the default configuration, paths are parsed synchronously using JavaScript's native RegExp engine. Because this engine is embedded within Node.js, any extensive computation occurring during execution blocks the single-threaded event loop, preventing the server from handling other asynchronous operations.
An attacker with permissions to design or edit workflows can configure a Git node to point to a crafted path containing multiple nested directories. This triggers a worst-case validation scenario where the regular expression evaluation stalls. The resulting execution freeze blocks all concurrent workflows, API routes, and administrative functions.
The underlying vulnerability is classified as CWE-1333: Inefficient Regular Expression Complexity. The application defines a default regular expression pattern meant to block access to specific directories such as .git. The vulnerable pattern was configured as ^(.*/)*.git(/.*)$ in the system's security configuration.
This expression contains nested and overlapping quantifiers inside the leading prefix capture group (.*/)*. Within this group, the subpattern .* matches any characters (including slashes) zero or more times, while the outer grouping * allows this entire segment to repeat. Because multiple combinations of the same input sequence can satisfy both the inner and outer quantifiers, the parser experiences extreme ambiguity.
When evaluated against a path consisting of multiple slash characters that does not terminate in a match for .git, the engine executes exponential backtracking. It attempts to evaluate all $2^{N-1}$ possible ways to partition the string, where $N$ represents the number of directory segments. For input strings with 30 or more nested folders, the evaluation requires hundreds of millions of states, completely starving the processor of CPU cycles.
The vulnerability lies within packages/@n8n/config/src/configs/security.config.ts, where the default configuration for blockFilePatterns is declared. Below is an analysis of the vulnerable and patched patterns.
// VULNERABLE PATTERN
@Env('N8N_BLOCK_FILE_PATTERNS')
blockFilePatterns: string = '^(./)*.git(/.*)$';
// Resolves to: ^(.*/)*.git(/.*)$In the vulnerable pattern, the unescaped dot in .git behaves as a wildcard, compounding the parsing matching states. Furthermore, the nested group (.*/)* matches slashes within slashes, which triggers backtracking when matching fails at the terminal character set.
// PATCHED PATTERN
@Env('N8N_BLOCK_FILE_PATTERNS')
blockFilePatterns: string = '^(?:[^/]*/)*\\.git(?:/.*)?$';
// Resolves to: ^(?:[^/]*/)*\.git(?:/.*)?$The fix introduces three security enhancements to make the regex deterministic. First, it replaces .* with [^/]*, meaning the parser can only match non-slash characters within each segment. Second, the dot character in .git is properly escaped as \\.git to ensure a literal match. Third, the terminal wildcard group is rewritten as an optional non-capturing group (?:/.*)? which avoids matching state growth.
Exploitation requires authenticated access to the n8n workflow editor interface, matching the CVSS privilege requirement of 'Low'. The attacker creates a new workflow on the canvas and places a standard Git node. The attack vector specifically targets the Git repository clone path argument parameter.
The attacker configures the Node's action to 'Clone' and inputs a custom repository path. This input path is crafted as a sequence of repeating characters and slashes that intentionally lacks the terminal match required by the expression, such as a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/.
Upon clicking 'Execute Node', the request is transmitted to the n8n backend. The backend processes the parameter and invokes the synchronous regex match. Since JavaScript's engine is single-threaded, the process enters an unresponsive state, causing health check timeouts and terminating handling of any concurrent requests.
The successful exploitation of CVE-2026-86081 causes a complete denial of service (DoS) of the targeted n8n platform. This degrades system availability, impacting scheduled integrations, API integrations, and webhook receivers. For enterprise environments relying on n8n for orchestration, a freeze halts automated workflows across the organization.
The vulnerability is assessed with a CVSS v4.0 score of 7.1. While confidentiality and integrity remain unaffected, the impact to system availability is rated as High. Because the execution blocks the event loop directly, recovery typically requires an administrative restart of the Node.js process or container.
The primary remediation step is upgrading the n8n instance to a patched release. Ensure the software is updated to version 1.123.76, 2.37.7, or 2.38.2 depending on the branch deployed.
If patching is not immediately feasible, system administrators can mitigate the issue by declaring the secure regex via the environment configuration. Setting N8N_BLOCK_FILE_PATTERNS='^(?:[^/]*/)*\.git(?:/.*)?$' inside the n8n environment overwrites the vulnerable default pattern with the hardened expression.
To detect exploitation attempts, monitor system metrics for sustained 100% CPU usage on the n8n Node.js process accompanied by a total drop in HTTP request throughput. Security teams can parse historical database states for workflow definitions containing Git node parameters with repetitive path components.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
n8n n8n | < 1.123.76 | 1.123.76 |
n8n n8n | >= 2.0.0 < 2.37.7 | 2.37.7 |
n8n n8n | >= 2.38.0 < 2.38.2 | 2.38.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-1333 |
| Attack Vector | Network |
| CVSS v4.0 Score | 7.1 |
| EPSS Score | 0.00322 |
| Exploit Status | poc |
| CISA KEV Status | Not Listed |
The regular expression engine initiates catastrophic backtracking when processing a sequence of directory separators, locking the single-threaded Node.js event loop.
CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.
An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.
CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.
CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.
CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.
CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.