GHSA-p6q4-fgr8-vx4p: Scriban Scriban Has A Stack Overflow Vulnerability
HIGHGHSA-p6q4-fgr8-vx4p is a HIGH (CVSS 7.5) scriban has a stack overflow vulnerability (CWE-674: Uncontrolled Recursion) affecting Scriban libraries in the NuGet ecosystem. The issue involves scriban has a stack overflow via nested array initializers that bypass the expressiondepthlimit fix. Remediation is available by upgrading affected packages to version 7.0.0.
GHSA-p6q4-fgr8-vx4p at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix GHSA-p6q4-fgr8-vx4p
To remediate this vulnerability, upgrade all affected Scriban dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade Scriban to 7.0.0
Upgrade Scriban.Signed to 7.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for Scriban
How to Check if You Are Affected
To determine whether your application is affected by GHSA-p6q4-fgr8-vx4p, inspect your project dependencies for Scriban:
inspect dependencies for Scriban
Analyze the terminal output to locate any version of Scriban in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Scriban, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-p6q4-fgr8-vx4p Affected Scriban Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Scriban
|
NuGet |
< 7.0.0
|
7.0.0
|
|
Scriban.Signed
|
NuGet |
< 7.0.0
|
7.0.0
|
References
Frequently Asked Questions
What is GHSA-p6q4-fgr8-vx4p?
Which Scriban versions are affected?
What version fixes GHSA-p6q4-fgr8-vx4p?
Is Scriban affected?
Is Scriban.Signed affected?
What is the CVSS score of GHSA-p6q4-fgr8-vx4p?
What CWE is associated with GHSA-p6q4-fgr8-vx4p?
How can I check NuGet dependencies for GHSA-p6q4-fgr8-vx4p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p6q4-fgr8-vx4p",
"modified" : "2026-07-06T13:07:26Z",
"published" : "2026-03-24T22:06:24Z",
"aliases" : [ ],
"summary" : "Scriban has a Stack Overflow via Nested Array Initializers That Bypass the ExpressionDepthLimit Fix",
"details" : "### Summary\nStackOverflowException via nested array initializers bypasses ExpressionDepthLimit fix (GHSA-wgh7-7m3c-fx25)\n\n### Details\nThe 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.\n\nThis causes a `StackOverflowException` on current main (commit b5ac4bf - \"Add limits for default safety\").\n\n### PoC\n```\nusing Scriban;\n\n// ExpressionDepthLimit (default 250) does NOT prevent this crash\nstring nested = \"{{ \" + new string('[', 5000) + \"1\" + new string(']', 5000) + \" }}\";\nTemplate.Parse(nested); // StackOverflowException - process terminates\n```\n\n### Impact\nSame 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "Scriban"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Scriban.Signed"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/scriban/scriban/security/advisories/GHSA-p6q4-fgr8-vx4p"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-wgh7-7m3c-fx25"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/scriban/scriban"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-674" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-24T22:06:24Z",
"nvd_published_at" : null
}
}