CVE-2026-74791
No CISA KEV listing is included in this saved record. Exploitation may still have occurred.
FIRST EPSS: 0.43 % · percentile 38.22 % · scored 19 Nov 2026.
Saved 19 Nov 2026 16:46:59 UTC · View this risk record (JSON)
No access to your tenant or devices. Every item links to its source. What this means
Scriban before 7.0.0 fails to clear the CachedTemplates dictionary when TemplateContext.Reset() is called, allowing cached templates to persist across reused contexts. Attackers can exploit request-dependent ITemplateLoader implementations to access previously authorized template content from earlier renders without triggering TemplateLoader.Load() again.
Read the publisher's advisoryScriban before 7.0.0 fails to clear the CachedTemplates dictionary when TemplateContext.Reset() is called, allowing cached templates to persist across reused contexts. Attackers can exploit request-dependent ITemplateLoader implementations to access previously authorized template content from earlier renders without triggering TemplateLoader.Load() again.
Read the publisher's advisoryScriban before 7.0.0 fails to clear the CachedTemplates dictionary when TemplateContext.Reset() is called, allowing cached templates to persist across reused contexts. Attackers can exploit request-dependent ITemplateLoader implementations to access previously authorized template content from earlier renders without triggering TemplateLoader.Load() again.
Read the publisher's advisory## Summary `TemplateContext.Reset()` claims that a `TemplateContext` can be reused safely on the same thread, but it does not clear `CachedTemplates`. If an application pools `TemplateContext` objects and uses an `ITemplateLoader` that resolves content per request, tenant, or user, a previously authorized include can be served to later renders without calling `TemplateLoader.Load()` again. ## Details The relevant code path is: - `TemplateContext.Reset()` only clears output, globals, cultures, and source files in `src/Scriban/TemplateContext.cs` lines 877–902. - `CachedTemplates` is initialized once and kept on the context in `src/Scriban/TemplateContext.cs` line 197. - `include` resolves templates through `IncludeFunction.Invoke()` in `src/Scriban/Functions/IncludeFunction.cs` lines 29–43. - `IncludeFunction.Invoke()` calls `TemplateContext.GetOrCreateTemplate()` in `src/Scriban/TemplateContext.cs` lines 1249–1256. - If a template path is already present in `CachedTemplates`, Scriban returns the cached compiled template and does **not** call `TemplateLoader.Load()` again. This becomes a security issue when `ITemplateLoader.Load()` returns request-dependent content. A first render can prime the cache with an admin-only or tenant-specific template, and later renders on the same reused `TemplateContext` will receive that stale template even after `Reset()`. --- ## Proof of Concept ### Setup ```bash mkdir scriban-poc1 cd scriban-poc1 dotnet new console --framework net8.0 dotnet add package Scriban --version 6.6.0 ``` ### `Program.cs` ```csharp using Scriban; using Scriban.Parsing; using Scriban.Runtime; var loader = new SwitchingLoader(); var context = new TemplateContext { TemplateLoader = loader, }; var template = Template.Parse("{{ include 'profile' }}"); loader.Content = "admin-only"; Console.WriteLine("first=" + template.Render(context)); context.Reset(); loader.Content = "guest-view"; Console.WriteLine("second=" + template.Render(context)); sealed class SwitchingLoader : ITemplateLoader { public string Content { get; set; } = string.Empty; public string GetPath(TemplateContext context, SourceSpan callerSpan, string templateName) => templateName; public string Load(TemplateContext context, SourceSpan callerSpan, string templatePath) => Content; public ValueTask<string> LoadAsync(TemplateContext context, SourceSpan callerSpan, string templatePath) => new(Content); } ``` ### Run ```bash dotnet run ``` ### Actual Output ``` first=admin-only second=admin-only ``` ### Expected Output ``` first=admin-only second=guest-view ``` The second render should reload the template after `Reset()`, but it instead reuses the cached compiled template from the previous render. --- ## Impact This is a cross-render data isolation issue. Any application that reuses `TemplateContext` objects and uses a request-dependent `ITemplateLoader` can leak previously authorized template content across requests, users, or tenants. The issue impacts applications that: - Pool or reuse `TemplateContext` - Call `Reset()` between requests - Use `include` - Resolve include content based on request-specific state
Read the publisher's advisoryCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No CISA KEV listing is included in this saved record. Exploitation may still have occurred.
FIRST EPSS: 0.43 % · percentile 38.22 % · scored 19 Nov 2026.
Saved 19 Nov 2026 16:46:59 UTC · View this risk record (JSON)
Compare earlier KEV listings and EPSS scores. Advisory wording and affected versions have a separate history.
A prediction change is reported when EPSS rises from below 10% to 10% or higher. Every daily score change from the last 30 days stays in this history. Before that, it keeps KEV changes and moves between EPSS bands (0.1%, 1%, 5%, 10%, 20%, 50% and 90%).
CVE-2026-74791 · 19 Nov 2026 16:46:59 UTC
CVE-2026-74791 · 18 Nov 2026 15:46:44 UTC
CVE-2026-74791 · 17 Nov 2026 15:26:11 UTC
CVE-2026-74791 · 17 Nov 2026 02:39:16 UTC
CVE-2026-74791 · 15 Nov 2026 14:45:34 UTC
CVE-2026-74791 · 14 Nov 2026 16:37:01 UTC
CVE-2026-74791 · 13 Nov 2026 19:59:34 UTC
CVE-2026-74791 · 12 Nov 2026 18:18:51 UTC
CVE-2026-74791 · 10 Nov 2026 20:24:10 UTC
CVE-2026-74791 · 09 Nov 2026 21:04:24 UTC
CVE-2026-74791 · 08 Nov 2026 15:12:21 UTC
CVE-2026-74791 · 07 Nov 2026 16:07:52 UTC
CVE-2026-74791 · 06 Nov 2026 19:10:17 UTC
CVE-2026-74791 · 05 Nov 2026 22:49:22 UTC
CVE-2026-74791 · 05 Nov 2026 02:54:06 UTC
CVE-2026-74791 · 03 Nov 2026 16:59:18 UTC
CVE-2026-74791 · 02 Nov 2026 23:59:04 UTC
CVE-2026-74791 · 01 Nov 2026 23:58:58 UTC
CVE-2026-74791 · 01 Nov 2026 03:04:52 UTC
CVE-2026-74791 · 31 Oct 2026 01:52:30 UTC
CVE-2026-74791 · 29 Oct 2026 18:29:26 UTC
CVE-2026-74791 · 28 Oct 2026 19:55:37 UTC
CVE-2026-74791 · 27 Oct 2026 15:46:19 UTC
CVE-2026-74791 · 27 Oct 2026 00:23:05 UTC
CVE-2026-74791 · 25 Oct 2026 15:18:41 UTC
See how the publisher's advisory changed over time. Each link opens the version saved at that time. The publisher's update date can differ from the date shown here.
Each link identifies one complete publisher record. History can include advisories that previously shared an identifier; an identifier removed by a publisher no longer establishes a current relationship. A historical link shows only that record and earlier saved versions. Failed checks and unchanged reads do not create new versions.
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
euvd · EUVD-2026-59957 · Published
nvd · CVE-2026-74791 · Published
osv · GHSA-x6m9-38vm-2xhf · Published
cve-program · CVE-2026-74791 · Published