Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Scriban has a Stack Overflow via Nested Array Initializers That Bypass the ExpressionDepthLimit Fix

0
High
Published: 03/24/2026 (03/24/2026, 22:06:24 UTC)
Source: GCVE Database
Product: Scriban

Description

### 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.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

NuGetghsa
Scriban
Affected versions
<7.0.0
NuGetghsa
Scriban.Signed
Affected versions
<7.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/06/2026, 23:33:55 UTC

Technical Analysis

The vulnerability in Scriban involves a StackOverflowException triggered by deeply nested array initializers that circumvent the ExpressionDepthLimit fix introduced in a previous advisory (GHSA-wgh7-7m3c-fx25). While the ExpressionDepthLimit limits recursion depth for expressions, nested array initializers recurse via a different code path (ParseArrayInitializer → ParseExpression → ParseArrayInitializer) that is not accounted for by this limit. This results in a stack overflow when parsing templates with excessive nested arrays, causing the .NET process to terminate abruptly. The vulnerability affects Scriban versions before 7.0.0 and poses a high severity risk due to denial of service via process termination.

Potential Impact

The impact is a denial of service condition where the Scriban template parser crashes with a StackOverflowException when processing deeply nested array initializers. Because StackOverflowException cannot be caught in .NET, the entire process terminates immediately. Applications that parse untrusted input using vulnerable Scriban versions are at risk of unexpected termination, potentially disrupting service availability.

Mitigation Recommendations

No official patch or fix is currently available for this vulnerability. Users should avoid parsing untrusted input containing deeply nested array initializers with affected Scriban versions (<7.0.0). Monitor the vendor advisory for updates on remediation. Since this is not a cloud service, remediation depends on upgrading Scriban when a fix is released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-p6q4-fgr8-vx4p
Osv Schema Version
1.4.0
Aliases
[]
Ecosystems
["NuGet"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a4c346127e9c79719600adf

Added to database: 07/06/2026, 23:04:01 UTC

Last enriched: 07/06/2026, 23:33:55 UTC

Last updated: 07/31/2026, 12:27:30 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses