GHSA-5rpf-x9jg-8j5p: Scriban Denial of Service Vulnerability
MODERATEGHSA-5rpf-x9jg-8j5p is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Scriban libraries in the NuGet ecosystem. The issue involves scriban affected by memory exhaustion (oom) via unbounded string generation (denial of service). Remediation is available by upgrading affected packages to version 6.6.0.
GHSA-5rpf-x9jg-8j5p at a Glance
Security Impact
CVSS: 5.3
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:L).
How to Fix GHSA-5rpf-x9jg-8j5p
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 6.6.0
Upgrade Scriban.Signed to 6.6.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-5rpf-x9jg-8j5p, 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 6.6.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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. 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-5rpf-x9jg-8j5p Affected Scriban Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
scriban
|
NuGet |
< 6.6.0
|
6.6.0
|
|
Scriban.Signed
|
NuGet |
< 6.6.0
|
6.6.0
|
References
Frequently Asked Questions
What is GHSA-5rpf-x9jg-8j5p?
Which Scriban versions are affected?
What version fixes GHSA-5rpf-x9jg-8j5p?
Is scriban affected?
Is Scriban.Signed affected?
What is the CVSS score of GHSA-5rpf-x9jg-8j5p?
What CWE is associated with GHSA-5rpf-x9jg-8j5p?
How can I check NuGet dependencies for GHSA-5rpf-x9jg-8j5p?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5rpf-x9jg-8j5p",
"modified" : "2026-07-06T13:06:49Z",
"published" : "2026-03-19T21:31:10Z",
"aliases" : [ ],
"summary" : "Scriban Affected by Memory Exhaustion (OOM) via Unbounded String Generation (Denial of Service)",
"details" : "`TemplateContext.LimitToString` defaults to `0` (unlimited). While Scriban implements a default `LoopLimit` of 1000, an attacker can still cause massive memory allocation via exponential string growth. Doubling a string for just 30 iterations generates over 1GB of text, instantly exhausting heap memory and crashing the host process. Because no output size limit is enforced, repeated string concatenation results in exponential memory growth.\n\n**Proof of Concept (PoC):**\nThe following payload executes in under 30 iterations but results in ~1GB string allocation, crashing the process.\n\n```csharp\nusing Scriban;\n\nstring maliciousTemplate =\n @\"\n {{\n a = \"\"A\"\"\n for i in 1..30\n a = a + a\n end\n a\n }}\";\n\nvar template = Template.Parse(maliciousTemplate);\n\nvar context = new TemplateContext();\n\ntry\n{\n template.Render(context);\n}\ncatch (Exception ex)\n{\n Console.WriteLine(\"\\nException: \" + ex.Message);\n}\n```\n\n**Impact:**\nAn attacker can supply a small template that triggers exponential string growth, forcing the application to allocate excessive memory. This leads to severe memory pressure, garbage collection thrashing, and eventual process termination (DoS).\n\n**Suggested Fix:**\nEnforce a sensible default limit for string output. Set default `LimitToString` to 1MB (1,048,576 characters). \n\n```csharp\npublic int LimitToString { get; set; } = 1048576; \n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "scriban"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.6.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.5.8"
}
}, {
"package" : {
"ecosystem" : "NuGet",
"name" : "Scriban.Signed"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.6.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.5.8"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/scriban/scriban/security/advisories/GHSA-5rpf-x9jg-8j5p"
}, {
"type" : "WEB",
"url" : "https://github.com/scriban/scriban/commit/a6fe6074199e5c04f4d29dc8d8e652b24d33e3e4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/scriban/scriban"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-19T21:31:10Z",
"nvd_published_at" : null
}
}