n8n - 💡(How to fix) Fix Security: Expression Timeout Bypass via Long-Running Operations (N8N-EXEC-001) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28222Fetched 2026-04-09 08:15:58
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×1labeled ×1mentioned ×1subscribed ×1

Expression Timeout Bypass via Long-Running Operations

Root Cause

Expression Timeout Bypass via Long-Running Operations

Fix Action

Fix / Workaround

Patched Versions

Pending fix

RAW_BUFFERClick to expand / collapse

GHSA Submission: N8N-EXEC-001

Summary

Expression Timeout Bypass via Long-Running Operations

Description

Isolated-vm timeout applies to script.runSync but complex internal operations (regex catastrophic backtracking, large JSON.parse) may not be interruptible mid-execution.

Severity

LOW (CVSS 3.1)

CWE

CWE-400 (Resource Exhaustion)

Affected Package/Repository

n8n-io/n8n

Affected File

n8n/packages/@n8n/expression-runtime/src/bridge/isolated-vm-bridge.ts

Vulnerable Version Range

All versions with default 10s timeout, 128MB memory settings

Patched Versions

Pending fix

Reproduction

Default configuration uses 10s timeout and 128MB memory limit. However, CPU-intensive JavaScript operations within a single script.runSync() call may bypass timeout enforcement. Examples include:

  • Regex catastrophic backtracking patterns
  • Large JSON.parse() operations on deeply nested structures
  • Complex computational loops without async yield points

Impact

Malicious or malformed expressions can cause resource exhaustion, potentially leading to denial of service or degraded performance for other workflow executions.

Recommended Fix

Implement more granular timeout enforcement that can interrupt CPU-intensive operations mid-execution, not just at script.runSync boundaries. Consider adding operation counting or periodic yield checks.

References

extent analysis

TL;DR

Implementing more granular timeout enforcement that can interrupt CPU-intensive operations mid-execution is likely to fix the resource exhaustion issue.

Guidance

  • Review the isolated-vm-bridge.ts file to understand the current timeout enforcement mechanism and identify potential points for improvement.
  • Consider adding operation counting or periodic yield checks to detect and interrupt long-running operations, such as regex catastrophic backtracking or large JSON.parse operations.
  • Evaluate the feasibility of implementing async yield points in complex computational loops to allow for timeout enforcement.
  • Assess the impact of increasing the memory limit or timeout duration on the overall performance and security of the system.

Example

No specific code example is provided, as the issue requires a more fundamental change to the timeout enforcement mechanism.

Notes

The recommended fix requires a thorough understanding of the isolated-vm-bridge.ts file and the underlying mechanics of the script.runSync method. The implementation of more granular timeout enforcement may have performance implications that need to be carefully evaluated.

Recommendation

Apply workaround: Implementing more granular timeout enforcement is a complex task that requires careful consideration of performance and security implications. A workaround, such as increasing the memory limit or timeout duration, may be necessary until a patched version is available. However, this may not fully address the underlying issue and should be carefully evaluated.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING