CVE-2026-137511: Scriban before 7.6.0 State Leakage via TemplateContext.Reset() Tags
Scriban before 7.6.0 contains a state isolation vulnerability because TemplateContext.Reset() does not clear the Tags dictionary holding array.cycle and math.random state. Attackers supplying templates to a reused context can observe or influence cycle positions and random sequences across renders, and accumulate unbounded cycle entries to exhaust memory.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using Scriban before 7.6.0 are exposed when they reuse a TemplateContext across renders and allow attackers to supply templates. The impact includes cross-render observation or influence of array.cycle positions and math.random sequences, as well as memory exhaustion through accumulated cycle entries.
What does an attacker need to exploit it?
An attacker needs the ability to provide templates that are rendered using a reused TemplateContext. No user interaction is required.
Is a default configuration affected?
The issue depends on context reuse: TemplateContext.Reset() does not clear the Tags dictionary. The provided information does not establish whether applications reuse contexts by default.
What should be done if upgrading is not immediately possible?
Avoid rendering attacker-supplied templates with a reused TemplateContext. Use an isolated context for each untrusted render so Tags state cannot persist between renders.