IA Squad
SearchPT
dotnet · ScribanHeads-up

Scriban ExpressionDepthLimit bypass leads to StackOverflowException

The ExpressionDepthLimit parser guard in Scriban does not halt recursion; it only logs a non-fatal error.

27 Jun 2026Read 1 minSeverity: schedule it

What changed

The ExpressionDepthLimit parser guard in Scriban does not halt recursion; it only logs a non-fatal error. This allows deeply nested expressions to cause an uncatchable StackOverflowException, leading to process termination. All versions 6.6.0 through 7.2.0 are affected.

Who it affects

Any application that parses attacker-influenced templates or passes attacker-controlled strings to object.eval/object.eval_template.

What to do today

Apply the suggested remediation: make the limit actually stop descent by throwing a parse exception or logging with isFatal:true and unwinding. As defense in depth, call RuntimeHelpers.EnsureSufficientExecutionStack() at ParseExpression entry.

The trail
Collected Audited Written Published