CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-GRR9-747V-XVCP

GHSA-GRR9-747V-XVCP: Uncontrolled Recursion in Scriban Templates Leads to Denial of Service

Alon Barad
Alon Barad
Software Engineer

Mar 20, 2026·6 min read·75 visits

Executive Summary (TL;DR)

A denial-of-service vulnerability exists in the Scriban .NET templating engine due to missing depth limits for nested expressions and object traversal. Attackers can trigger an uncatchable StackOverflowException, immediately terminating the host process. Mitigation requires updating the package or manually configuring recursion limits.

Scriban, a .NET text templating engine, is vulnerable to a high-severity denial-of-service (DoS) flaw due to uncontrolled recursion during template parsing and object rendering. The lack of default depth boundaries allows maliciously crafted templates or objects with circular references to exhaust the call stack, causing an unrecoverable process crash.

Vulnerability Overview

Scriban is a fast, powerful text templating engine for .NET applications, frequently used for dynamic content generation, email rendering, and code generation. GHSA-GRR9-747V-XVCP identifies a high-severity vulnerability within the engine's core processing logic that allows for unauthenticated denial-of-service (DoS) attacks.

The vulnerability is classified as Uncontrolled Recursion (CWE-674) and Uncontrolled Resource Consumption (CWE-400). It manifests in two distinct phases of the engine's lifecycle: the parsing of the template structure and the rendering of the provided data model. In both cases, the engine fails to enforce bounds on the depth of the operations.

Because the underlying platform is .NET, exhausting the call stack results in a StackOverflowException. Unlike standard exceptions, a stack overflow in modern .NET environments is unrecoverable and immediately terminates the process, making this an effective and highly disruptive attack vector against applications relying on Scriban.

Root Cause Analysis

The root cause of this vulnerability lies in the "unlimited by default" configuration design of the Scriban engine. The engine exposes limits for parsing and rendering, but prior to the patch, these bounds were either disabled or absent by default, shifting the burden of safety entirely onto the implementing developer.

During the rendering phase, the TemplateContext object is responsible for managing the state and traversal of the data model. The property ObjectRecursionLimit was historically initialized to 0, which the engine interpreted as an instruction to perform boundless recursion. If the object graph contains a circular reference, the engine traverses it infinitely until thread stack space is entirely consumed.

During the parsing phase, the abstract syntax tree (AST) generation is governed by the ParserOptions class. The ExpressionDepthLimit property was set to null by default. This permitted the parser to accept and process templates containing extreme levels of syntactic nesting, such as thousands of nested parenthetical expressions, leading to call stack exhaustion before the rendering phase even begins.

Code Analysis & Patch Review

The remediation introduced in commit a6fe6074199e5c04f4d29dc8d8e652b24d33e3e4 addresses the vulnerability by enforcing safe, finite default limits across both affected code paths. The fix fundamentally alters the default state of the engine to prioritize resilience over unbounded processing.

// Vulnerable State (Conceptual)
public class TemplateContext {
    public int ObjectRecursionLimit { get; set; } = 0; // 0 = Unlimited
}
 
public class ParserOptions {
    public int? ExpressionDepthLimit { get; set; } = null; // null = Unlimited
}

The patched version establishes hardcoded default limits. The ObjectRecursionLimit is now defaulted to 20, ensuring that rendering traversal will abort safely if an object graph is exceptionally deep or circular. Similarly, the ExpressionDepthLimit is defaulted to 250, preventing AST parsing from spiraling out of control.

// Patched State (Conceptual)
public class TemplateContext {
    public int ObjectRecursionLimit { get; set; } = 20;
}
 
public class ParserOptions {
    public int? ExpressionDepthLimit { get; set; } = 250;
}

Crucially, when these new limits are exceeded, the engine explicitly halts processing and throws a ScriptRuntimeException. This is a standard managed exception that can be caught by the host application's error handling logic, preventing the fatal process crash.

Exploitation & Attack Methodology

Exploitation requires no specialized tooling and relies solely on the ability to provide input that the target application processes using the Scriban engine. The attack is highly deterministic and consistently results in a denial-of-service condition.

The parsing vector involves injecting a maliciously crafted template string. An attacker can construct a payload containing hundreds or thousands of nested structures. A simple example involves deeply nested parentheses: {{ (((...))) }}. When the application invokes the template parsing logic, the recursive descent parser exhausts the call stack attempting to evaluate the nested nodes.

The rendering vector involves manipulating the data model passed to the engine. If the application serializes user-controlled data into an object that is subsequently rendered, the attacker can establish a self-referencing relationship. For example, creating an entity where ObjectA.Child = ObjectA. When Template.Render(context) is called, the renderer attempts to resolve the infinite loop.

Impact Assessment

The vulnerability directly compromises the availability of the application hosting the Scriban engine. The estimated CVSS v3.1 base score is 7.5, reflecting a network-based attack with low complexity, no required privileges, and a high impact on availability (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

The consequence of a StackOverflowException in the .NET Common Language Runtime (CLR) is severe. The runtime considers stack corruption to be an unrecoverable state, meaning standard try/catch blocks surrounding the Scriban rendering logic will be completely bypassed. The operating system immediately terminates the application process.

In a production environment, this translates to the complete outage of the affected service. For web applications, the application pool or worker process will crash, dropping all current connections and requiring a restart. In a distributed architecture, repeated exploitation will cause continuous health check failures, leading load balancers or container orchestrators to perpetually cycle the service, resulting in extended downtime.

Remediation & Mitigation

The most effective and comprehensive remediation is to update the Scriban NuGet package to the latest version published after March 2026, which includes the fix commit a6fe6074199e5c04f4d29dc8d8e652b24d33e3e4. The updated version safely handles deeply nested expressions and circular references by throwing manageable exceptions rather than crashing.

If an immediate upgrade is not feasible, developers must manually enforce the depth limits within their application code. This workaround exactly mirrors the logic introduced in the official patch and provides immediate protection against the vulnerability.

To apply the mitigation, the ObjectRecursionLimit must be set on every instantiated TemplateContext, and the ExpressionDepthLimit must be explicitly defined in the ParserOptions. Developers should ensure these limits are applied globally wherever the Scriban engine is initialized in the codebase.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Systems

Scriban .NET Templating EngineAny .NET application utilizing vulnerable versions of the Scriban NuGet package

Affected Versions Detail

Product
Affected Versions
Fixed Version
Scriban
Scriban Contributors
All versions prior to the March 2026 fix-
AttributeDetail
Vulnerability ClassUncontrolled Recursion (CWE-674)
Secondary ClassUncontrolled Resource Consumption (CWE-400)
Attack VectorNetwork
CVSS v3.1 Base Score7.5 (High)
ImpactDenial of Service (Process Crash)
Exploit StatusProof of Concept available
Privileges RequiredNone

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1190Exploit Public-Facing Application
Initial Access
CWE-674
Uncontrolled Recursion

The program does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Vulnerability Timeline

Patch Committed to Scriban Repository
2026-03-19
Security Advisory GHSA-GRR9-747V-XVCP Published
2026-03-20

References & Sources

  • [1]GitHub Advisory: GHSA-GRR9-747V-XVCP
  • [2]Official Scriban Repository
  • [3]Fix Commit (a6fe6074199e5c04f4d29dc8d8e652b24d33e3e4)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-59817
5.3

CVE-2026-59817: Premium Membership Provisioning Bypass via Parameter Tampering in Ghost CMS

An unauthenticated remote business logic vulnerability in Ghost CMS versions 6.27.0 through 6.43.1 allows attackers to bypass paid subscription gates. By injecting reserved metadata fields into public donation Stripe Checkout Sessions, attackers can obtain premium-tier memberships for arbitrary nominal amounts.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 2 hours ago•CVE-2026-70494
8.1

CVE-2026-70494: Broken Access Control in Open WebUI Folder Deletion Endpoint

A critical broken access control vulnerability in Open WebUI (v0.10.0 to v0.11.0) allows authenticated write-collaborators to delete shared subfolders they do not own. Because deletion triggers a backend cascade using the folder owner's identity, this results in unauthorized permanent deletion of the owner's nested chats, messages, and files.

Alon Barad
Alon Barad
2 views•7 min read
•about 3 hours ago•CVE-2026-70485
7.1

CVE-2026-70485: Server-Side Request Forgery in Open WebUI via NAT64 IP Wrapping Bypass

Open WebUI is susceptible to Server-Side Request Forgery (SSRF) when deployed in networks with NAT64 translation gateways. Authenticated users can bypass host validation checks by encapsulating internal or cloud-metadata IPv4 addresses within globally-routable IPv6 transition prefixes.

Alon Barad
Alon Barad
6 views•5 min read
•about 4 hours ago•CVE-2026-70474
7.6

CVE-2026-70474: Incorrect Authorization and Missing Authentication in Flowise OAuth2 Credential Endpoints

A critical authorization flaw exists in Flowise, a popular drag-and-drop orchestrator for building customized Large Language Model flows. Prior to version 3.1.3, multiple OAuth2 credential endpoints do not filter database lookups by the requesting entity's workspace context. This omission, combined with the exclusion of several endpoints from the global authentication pipeline, permits unauthenticated remote actors to access, manipulate, or steal access tokens linked to external service integrations.

Alon Barad
Alon Barad
2 views•5 min read
•about 5 hours ago•GHSA-RWRP-9823-P2XQ
6.5

GHSA-RWRP-9823-P2XQ: Incomplete Credential Redaction in Flowise API

An incomplete credential redaction mechanism in Flowise allows authenticated users with standard view permissions to retrieve sensitive decrypted third-party credentials in plaintext.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 6 hours ago•CVE-2026-69262
7.1

CVE-2026-69262: Incorrect Authorization Flaw in Flowise Chatflow Deletion Endpoint

CVE-2026-69262 is a high-severity incorrect authorization vulnerability (CWE-863) within the Flowise drag-and-drop LLM flow platform. Prior to version 3.1.3, Flowise did not enforce resource-type validation on its deletion endpoint. Although routing middleware ensured users held deletion privileges for either chatflows or agentflows, the service level lacked validation checks to verify whether the target resource matched the user's specific permissions. Consequently, an authenticated user with only agentflow deletion permissions could delete arbitrary chatflow configurations, leading to unauthorized state modification and service disruption.

Amit Schendel
Amit Schendel
4 views•7 min read