Scriban unbounded string generation denial of service

Severity: medium · CVSS 5.3 · Published 2026-03-19

Scriban is a fast and powerful text templating engine for .NET. A vulnerability exists where an attacker can provide a specially crafted template that causes the application to consume massive amounts of memory, leading to a system crash or service outage. This occurs because the engine does not limit the size of strings generated during template processing by default.

Technologies: scriban (NuGet), Scriban.Signed (NuGet). Vendors: NuGet.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Medium severity, with a CVSS score of 5.3, published 19 March 2026.
Which products and versions are affected?
scriban (NuGet) <= 6.5.8; Scriban.Signed (NuGet) <= 6.5.8.
Is there a fix for This vulnerability?
A patch was published on 2026-03-19: Fix committed to repository Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run scriban (NuGet) or Scriban.Signed (NuGet) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The Scriban templating engine is vulnerable to a Denial of Service (DoS) via memory exhaustion (CWE-770). The root cause is that `TemplateContext.LimitToString` defaults to `0` (unlimited), allowing for unbounded string concatenation. An attacker can craft a template with a loop that performs exponential string growth (e.g., doubling a string 30 times to reach ~1GB). While Scriban has a default `LoopLimit` of 1000, this does not prevent memory exhaustion from string operations within those loops. This can be exploited by any user capable of providing or influencing a template that is rendered by the server. The vulnerability is addressed in version 6.6.0 by enforcing a default string limit.

Affected products

  • Scriban Scriban <= 6.5.8
  • Scriban Scriban.Signed <= 6.5.8

Timeline

  • 2026-03-19: advisory: GitHub Advisory GHSA-5rpf-x9jg-8j5p published
  • 2026-03-19: patched: Fix committed to repository

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.