n8n-io/n8n · error · RuntimeError
SECURITY_VIOLATION
SECURITY_VIOLATION
Error message
SECURITY_VIOLATION
What it means
Sentinel error code for RuntimeError raised when expression code tripped a sandbox security control inside the isolate — blocked globals, unsafe property tokens, or prototype access. The bridge maps it to SecurityViolationError; the offending expression construct is named in the message.
Solutions
- Read the message to see which construct was blocked (getPrototypeOf, __proto__, unsafe key, …)
- Rewrite the expression using plain data access only
- Move the blocked operation into a Code node with explicit, reviewable logic
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/expression-runtime/src/types/runtime.ts:11 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/70c83e4d5fe863ad.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/expression-runtime/src/types/runtime.ts:11
/**
* Runtime error thrown inside isolated context.
*
* These errors are thrown by the runtime code when something goes wrong during
* expression evaluation. The bridge must catch these and translate them to the
* appropriate ExpressionError subclass (see evaluator.ts).
*
* Translation mapping:
* - code: 'MEMORY_LIMIT' → MemoryLimitError
* - code: 'TIMEOUT' → TimeoutError
* - code: 'SECURITY_VIOLATION' → SecurityViolationError
* - code: 'SYNTAX_ERROR' → SyntaxError
* - other → ExpressionError
*/
export class RuntimeError extends Error {
constructor(
message: string,
public code: string,
public details?: Record<string, unknown>,
) {
super(message);
this.name = 'RuntimeError';
}
}
View on GitHub (pinned to 5ac6606e81)