Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ GHSA-5rpf-x9jg-8j5p — scriban

⚪ Unknown ✅ No Known Exploit CWE-770 OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Scriban Affected by Memory Exhaustion (OOM) via Unbounded String Generation (Denial of Service)

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.

Proof of Concept (PoC):

The following payload executes in under 30 iterations but results in ~1GB string allocation, crashing the process.

```csharp

using Scriban;

string maliciousTemplate =

@"

{{

a = ""A""

for i in 1..30

a = a + a

end

a

}}";

var template = Template.Parse(maliciousTemplate);

var context = new TemplateContext();

try

{

template.Render(context);

}

catch (Exception ex)

{

Console.WriteLine("\nException: " + ex.Message);

}

```

Impact:

An 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).

Suggested Fix:

Enforce a sensible default limit for string output. Set default LimitToString to 1MB (1,048,576 characters).

```csharp

public int LimitToString { get; set; } = 1048576;

```

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability low.

Weakness class

GHSA-5rpf-x9jg-8j5p is classified as CWE-770: Allocation of Resources Without Limits. Resources are allocated on request with no cap, so a client can exhaust them.

Affected software

GHSA-5rpf-x9jg-8j5p is recorded against 2 packages.

  • scriban (fixed in 6.6.0)
  • scriban.signed (fixed in 6.6.0)

Timeline and source

Published on 19 March 2026 and last revised on 6 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Package)

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE CWE-770
Public Exploit ✅ No
Source OSV
Published 2026-03-19
Updated 2026-08-20
Modified 2026-07-06
Fix URL N/A

Affected Packages

Software From version Fixed in
scriban 6.6.0
scriban.signed 6.6.0

Free Vulnerability Check

Is your site affected by GHSA-5rpf-x9jg-8j5p?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against GHSA-5rpf-x9jg-8j5p and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.