# Scriban unbounded string generation denial of service

Source: https://junglewise.ai/threats/scriban-unbounded-string-generation-denial-of-service-5b933c02  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-19. Updated: 2026-07-06  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/scriban), [Scriban.Signed (NuGet)](https://junglewise.ai/threats/technologies/scriban-signed). Vendors: [NuGet](https://junglewise.ai/threats/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

- [https://api.github.com/users/adamus2](https://api.github.com/users/adamus2)
- [https://github.com/adamus2](https://github.com/adamus2)
- [https://api.github.com/users/adamus2/gists%7B/gist_id%7D](https://api.github.com/users/adamus2/gists%7B/gist_id%7D)
- [https://api.github.com/users/adamus2/repos](https://api.github.com/users/adamus2/repos)
- [https://avatars.githubusercontent.com/u/93228314?v=4](https://avatars.githubusercontent.com/u/93228314?v=4)
- [https://api.github.com/users/adamus2/events%7B/privacy%7D](https://api.github.com/users/adamus2/events%7B/privacy%7D)

## Related threats

- [Scriban uncontrolled recursion stack overflow in parser](https://junglewise.ai/threats/cve-2026-74795-scriban-uncontrolled-recursion-stack-overflow-in-parser)
- [Scriban infinite recursion in object rendering](https://junglewise.ai/threats/cve-2026-74794-scriban-infinite-recursion-in-object-rendering)
- [Scriban stack overflow in nested array initializer parsing](https://junglewise.ai/threats/cve-2026-74792-scriban-stack-overflow-in-nested-array-initializer-parsing)
- [Scriban authorization bypass via stale include cache](https://junglewise.ai/threats/cve-2026-74791-scriban-authorization-bypass-via-stale-include-cache)
- [Scriban TypedObjectAccessor cache MemberFilter bypass](https://junglewise.ai/threats/cve-2026-74790-scriban-typedobjectaccessor-cache-memberfilter-bypass)
