Scriban has a Stack Overflow via Nested Array Initializers That Bypass the ExpressionDepthLimit Fix
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-674.
Summary
### Summary StackOverflowException via nested array initializers bypasses ExpressionDepthLimit fix (GHSA-wgh7-7m3c-fx25) ### Details The recent fix for GHSA-wgh7-7m3c-fx25 (uncontrolled recursion in parser) added `ExpressionDepthLimit` defaulting to 250. However, deeply nested **array initializers** (`[[[[...`) recurse through `ParseArrayInitializer` → `ParseExpression` → `ParseArrayInitializer`, which is a **different recursion path** not covered by the expression depth counter. This causes a `StackOverflowException` on current main (commit b5ac4bf - "Add limits for default safety"). ### PoC ``` using Scriban; // ExpressionDepthLimit (default 250) does NOT prevent this crash string nested = "{{ " + new string('[', 5000) + "1" + new string(']', 5000) + " }}"; Template.Parse(nested); // StackOverflowException - process terminates ``` ### Impact Same as GHSA-wgh7-7m3c-fx25: High severity. StackOverflowException cannot be caught with try/catch in .NET - the process terminates immediately. Any application calling Template.Parse with untrusted input is vulnerable, even with the new default ExpressionDepthLimit enabled.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | Scriban (NuGet) | before 7.0.0 | 7.0.0 | Patch available | GHSA-p6q4-fgr8-vx4p |
| — | Scriban.Signed (NuGet) | before 7.0.0 | 7.0.0 | Patch available | GHSA-p6q4-fgr8-vx4p |
- Scriban (NuGet) Vendor— Affected before 7.0.0 Fixed in 7.0.0 Patch available GHSA-p6q4-fgr8-vx4p
- Scriban.Signed (NuGet) Vendor— Affected before 7.0.0 Fixed in 7.0.0 Patch available GHSA-p6q4-fgr8-vx4p
Remediation
- Fix · GHSA-p6q4-fgr8-vx4p Scriban (NuGet) Fixed in 7.0.0 Advisory →
- Fix · GHSA-p6q4-fgr8-vx4p Scriban.Signed (NuGet) Fixed in 7.0.0 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-p6q4-fgr8-vx4p
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences