Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. scriban
  4. ›
  5. GHSA-wgh7-7m3c-fx25

GHSA-wgh7-7m3c-fx25: Scriban has Uncontrolled Recursion in Parser Leads to Stack Overflow and Process Crash (Denial of Service)

March 19, 2026

Scriban is vulnerable to an uncontrolled process crash resulting in a Denial of Service. Because the recursive-descent parser does not enforce a default limit on expression depth, an attacker who controls template input can craft a heavily nested template that triggers a StackOverflowException. In .NET, a StackOverflowException cannot be caught by standard try-catch blocks, resulting in the immediate and ungraceful termination of the entire hosting process.

Scriban utilizes a recursive-descent parser to process template expressions. While the library exposes an ExpressionDepthLimit property in its ParserOptions, this property defaults to null (disabled).

If an application accepts user-supplied templates (or dynamically constructs templates from untrusted input), an attacker can supply thousands of nested parentheses or blocks. As the parser recursively evaluates each nested layer, it consumes thread stack space until it exceeds the limits of the host OS, triggering a fatal crash.

References

  • github.com/advisories/GHSA-wgh7-7m3c-fx25
  • github.com/scriban/scriban
  • github.com/scriban/scriban/commit/a6fe6074199e5c04f4d29dc8d8e652b24d33e3e4
  • github.com/scriban/scriban/commit/b5ac4bf30459fdc76964e3f751e16f7e96079ea7
  • github.com/scriban/scriban/security/advisories/GHSA-wgh7-7m3c-fx25

Code Behaviors & Features

Detect and mitigate GHSA-wgh7-7m3c-fx25 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.6.0

Fixed versions

  • 6.6.0

Solution

Upgrade to version 6.6.0 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-674: Uncontrolled Recursion

Source file

nuget/scriban/GHSA-wgh7-7m3c-fx25.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 20 Mar 2026 12:17:28 +0000.