8.7high
Scriban before 7.0.0 Stack Overflow via nested array initializers
- Severity
- 8.7high CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.53% (higher than 38% of CVEs)
- Published
- Last changed
- Assigned by
- VulnCheck
- Also known as
- GHSA-p6q4-fgr8-vx4p
Description
Scriban before 7.0.0 (affected versions <= 6.6.0) contains a stack overflow vulnerability in nested array initializer parsing. Deeply nested array initializers recurse through a path (ParseArrayInitializer → ParseExpression → ParseArrayInitializer) that is not covered by the ExpressionDepthLimit counter added in the fix for GHSA-wgh7-7m3c-fx25. An attacker who can supply untrusted input to Template.Parse can trigger an uncatchable StackOverflowException that immediately terminates the process, even with the default ExpressionDepthLimit enabled.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| scriban scriban | before 7.0.0 Not affected: 7.0.0 | CVE List |
| Scriban (NuGet) | before 7.0.0 | GitHub Advisory Database |
| Scriban.Signed (NuGet) | before 7.0.0 | GitHub Advisory Database |
All scores
| VulnCheck | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| VulnCheck | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Scriban before 7.0.0 (affected versions <= 6.6.0) contains a stack overflow vulnerability in nested array initializer parsing. Deeply nested array initializers recurse through a path (ParseArrayInitializer → ParseExpression → ParseArrayInitializer) that is not covered by the ExpressionDepthLimit counter added in the fix for GHSA-wgh7-7m3c-fx25. An attacker who can supply untrusted input to Template.Parse can trigger an uncatchable StackOverflowException that immediately terminates the process, even with the default ExpressionDepthLimit enabled.
GitHub Advisory Database
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.
References
| https://github.com/scriban/scriban/security/advisories/GHSA-p6q4-fgr8-vx4p | exploit, vendor-advisory, web | |
| https://www.vulncheck.com/advisories/scriban-before-stack-overflow-via-nested-array-initializers | third-party-advisory | |
| https://github.com/advisories/GHSA-wgh7-7m3c-fx25 | advisory | |
| https://github.com/scriban/scriban | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-74792 changed 2026-08-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-p6q4-fgr8-vx4p changed 2026-08-17 | CC-BY-4.0 |
| NVD | CVE-2026-74792 changed 2026-09-08 | Public domain |