Skip to main content

Scriban EUVDEUVD-2026-59957

| CVE-2026-74791 CRITICAL
Sensitive Information in Resource Not Removed Before Reuse (CWE-226)
2026-08-16 VulnCheck GHSA-58jr-9c6g-55jq
9.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send privileged render request
  2. Delivery
    Include primes CachedTemplates with authorized template
  3. Exploit
    Context.Reset() reused for next request
  4. Execution
    Send low-privilege render request
  5. Persist
    Cached template returned without Load()
  6. Impact
    Read unauthorized template content

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V14 - Data Protection Sensitive info in resource not removed before reuse
Exploitation Conditions

Exploitation requires a specific, concrete deployment pattern in the consuming application: a TemplateContext instance that is pooled and reused (rather than created fresh per request) with reliance on TemplateContext.Reset() for isolation, combined with an ITemplateLoader whose Load()/LoadAsync() returns request-, tenant-, or user-dependent content, and use of the 'include' function with a stable template path/name across those contexts. The attacker also needs a render to have previously primed the cache with the more-privileged content (e.g., an earlier admin or other-tenant request) before the attacker's lower-privileged render reuses the same context. Limiting factors: applications that build a new TemplateContext per request, use static/non-request-dependent loaders, or do not use include are not exploitable; despite the CVSS PR:N/AC:L rating, the vulnerable pooling-plus-per-request-loader configuration is not Scriban's default usage and must be present for the leak to occur.

Impact

The signals are genuinely mixed and should be read carefully. The vendor/VulnCheck CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N, 9.2) treats this as a network, low-complexity, unauthenticated, high-confidentiality issue with a scope change to a subsequent system (another tenant/user), which is why it scores Critical. However, the AC:L/AT:N rating understates real preconditions: exploitation only works when the consuming application (a) pools and reuses a single TemplateContext across requests, (b) relies on Reset() for isolation, and (c) uses an ITemplateLoader whose Load() returns request-dependent content. Those are application-architecture conditions the attacker cannot control or guarantee, so realistic attack complexity is higher than AC:L implies. No EPSS score, KEV listing, or SSVC decision was provided in the input; absence of an EPSS/KEV signal here means exposure is unquantified rather than confirmed-low. Net assessment: a real and cleanly demonstrated confidentiality/authorization bug worth prioritizing for any product that embeds Scriban with a per-request loader and pooled contexts, but not a mass-exploitable network flaw against arbitrary Scriban deployments. The high CVSS should be tempered against those deployment-specific prerequisites.

Exploit ScenarioDerived

In a multi-tenant web app that pools one TemplateContext and uses an ITemplateLoader returning per-request content, an admin request first renders '{{ include "profile" }}', priming CachedTemplates with the admin-only compiled template. A later guest/low-privilege request reusing the same context after Reset() re-evaluates the same include path, receives the cached admin template without any fresh Load()/authorization call, and reads content it was never entitled to. The GHSA advisory ships a runnable dotnet proof-of-concept (a SwitchingLoader) demonstrating exactly this stale-cache leak.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 16, 2026

Information disclosure and authorization bypass in Scriban (the .NET text templating engine) before 7.0.0 lets attackers retrieve previously authorized include-template content from earlier renders. Because TemplateContext.Reset() clears output, globals, cultures, and source files but never clears the CachedTemplates dictionary, applications that pool a TemplateContext across requests and use a request-, tenant-, or user-dependent ITemplateLoader will serve a stale cached template to a later, less-privileged render without re-invoking TemplateLoader.Load(). A vendor patch exists (7.0.0) and a working proof-of-concept is published in the GHSA advisory, but there is no public exploit identified as used in active attacks.

RemediationAI

Vendor-released patch: upgrade Scriban (and Scriban.Signed) to 7.0.0 or later, which clears CachedTemplates on Reset(); update the NuGet package reference and rebuild. Where an immediate upgrade is not possible, the most effective compensating control is to stop reusing TemplateContext across security boundaries: construct a fresh TemplateContext per request/tenant/user instead of pooling one and calling Reset() - the trade-off is losing the compilation-cache performance benefit for included templates. Alternatively, resolve and authorize template content before it enters Scriban rather than relying on include-time authorization inside the loader, or clear the cache manually between renders if your integration exposes a way to do so. Do not depend on Reset() alone for tenant isolation on versions < 7.0.0. Reference the vendor advisory (GHSA-x6m9-38vm-2xhf) and the VulnCheck advisory linked above for details.

Affected VersionsENISA

scriban 0 <7.0.0

Affected Packages

nuget scriban fix: 7.0.0
nuget scriban.signed fix: 7.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in nuget

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Scriban is a widely used, fast open-source templating language and engine for .NET, commonly embedded to render user- or tenant-specific content. The flaw sits in its include-resolution path: IncludeFunction.Invoke() calls TemplateContext.GetOrCreateTemplate(), which consults the CachedTemplates dictionary and returns a previously compiled template if the path key is already present, skipping the ITemplateLoader.Load() call entirely. CachedTemplates is initialized once (src/Scriban/TemplateContext.cs line 197) and, critically, Reset() (lines 877-902) omits it. This maps to CWE-226 (Sensitive Information in Resource Not Removed Before Reuse): the reusable TemplateContext resource is intended to be sanitized by Reset() for safe reuse on the same thread, but a sensitive artifact - the compiled, access-controlled template - survives the reset and leaks into a subsequent security context. Affected package identifiers are nuget/scriban and nuget/Scriban.Signed, per the advisory.

Know when Scriban gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.2 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
vuln.today AI 6.8 MEDIUM

AC:H because exploitation needs a non-default pooled-context plus per-request-loader pattern and prior cache priming; PR:N/UI:N as the attacker just issues requests; S:C and C:H for cross-tenant content disclosure, no integrity/availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 16, 2026 - 14:01 EUVD
CVE Published
Aug 16, 2026 - 13:14 cve.org
CRITICAL 9.2

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Scriban's template caching mechanism can cause multi-tenant and multi-user applications to inadvertently expose sensitive templated content across authorization boundaries; publicly available exploit code exists but no active exploitation has been reported. Organizations serving multiple customers, departments, or security contexts through shared template pooling face immediate data privacy and compliance exposure.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Medium
popular .NET templating library, but exploit needs specific pooled-context integration
Social Media
4
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-73061 CRITICAL
9.3 Aug 16

Arbitrary CLR property writes in Scriban (the .NET templating engine) before 7.2.2 allow template code to mutate live ho

CVE-2026-74790 CRITICAL
9.3 Aug 16

Sandbox escape in the Scriban .NET templating engine (all versions before 7.0.0) lets attacker-influenced templates read

CVE-2026-73060 HIGH
8.7 Aug 16

Scriban template engine versions 3.0.0 through 7.2.5 expose any application accepting untrusted templates to complete CP

CVE-2026-74789 HIGH
8.7 Aug 16

Uncontrolled resource consumption in Scriban's .NET templating engine allows any party who can submit template input to

CVE-2026-74795 HIGH
8.7 Aug 16

Remote denial of service in Scriban before 6.6.0 allows unauthenticated attackers to crash the entire .NET hosting proce

CVE-2026-74792 HIGH
8.7 Aug 16

Process-terminating stack overflow in Scriban's template parser affects all versions before 7.0.0, allowing any attacker

CVE-2026-74794 HIGH
8.7 Aug 16

Scriban's template rendering engine before version 6.6.0 crashes the entire .NET hosting process when object graphs cont

CVE-2026-74788 HIGH
8.7 Aug 16

Uncontrolled memory allocation in Scriban's string.pad_left and string.pad_right template functions enables unauthentica

CVE-2026-74787 HIGH
8.7 Aug 16

Uncontrolled recursion in Scriban's `object.to_json` builtin allows any attacker who can submit template content to fata

CVE-2026-74783 HIGH
8.7 Aug 16

Process-terminating denial-of-service in Scriban 6.6.0-7.2.0 allows any network-reachable attacker to crash a host .NET

CVE-2026-73062 HIGH
8.7 Aug 16

Resource exhaustion in Scriban 3.0.0 through 7.2.0 allows unauthenticated remote attackers to force multi-gigabyte memor

CVE-2026-74784 HIGH
8.7 Aug 16

Unbounded memory allocation in Scriban's `array.insert_at` built-in function allows any template author to crash the hos

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy