Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. scriban
  4. ›
  5. GHSA-grr9-747v-xvcp

GHSA-grr9-747v-xvcp: Scriban has an Infinite Recursion during Object Rendering Leads to Stack Overflow and Process Crash (Denial of Service)

March 19, 2026

When Scriban renders an object that contains a circular reference, it traverses the object’s members infinitely. Because the ObjectRecursionLimit property defaults to unlimited, this behavior exhausts the thread’s stack space, triggering an uncatchable StackOverflowException that immediately terminates the hosting process.

When rendering objects (e.g., {{ obj }}), the Scriban rendering engine recursively inspects and formats the object’s properties. To prevent infinite loops caused by deeply nested or circular data structures, TemplateContext contains an ObjectRecursionLimit property.

However, this property currently defaults to 0 (unlimited). If the data context pushed into the template contains a circular reference, the renderer will recurse indefinitely. This is especially dangerous for web applications that map user-controlled payloads (like JSON) directly to rendering contexts, or for applications that pass ORM objects (like Entity Framework models, which frequently contain circular navigation properties) into the template.

References

  • github.com/advisories/GHSA-grr9-747v-xvcp
  • github.com/scriban/scriban
  • github.com/scriban/scriban/commit/a6fe6074199e5c04f4d29dc8d8e652b24d33e3e4
  • github.com/scriban/scriban/security/advisories/GHSA-grr9-747v-xvcp

Code Behaviors & Features

Detect and mitigate GHSA-grr9-747v-xvcp 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-grr9-747v-xvcp.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:51 +0000.