Description
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.
Published: 2026-08-16
Score: 9.2 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Scriban library before version 7.0.0 does not clear the CachedTemplates dictionary when TemplateContext.Reset() is called, causing cached templates to persist across reused contexts. This flaw enables attackers to exploit request‑dependent implementations of ITemplateLoader to retrieve template content that was previously authorized for an earlier render, without re‑invoking the loader. The result is a direct escalation of privilege or data‑exposure attack, permitting the attacker to view or use confidential template data that should be protected by application‑level authorization logic.

Affected Systems

The vulnerability affects any use of the Scriban templating engine in its pre‑7.0.0 releases. All versions prior to 7.0.0 are impacted, regardless of the host application, because the underlying caching mechanism is part of the core library. Projects that rely on Scriban for server‑side rendering or other templating tasks must verify the version in use and upgrade if it falls within this range.

Risk and Exploitability

With a CVSS score of 9.2 the severity is high and the vulnerability presents a significant opportunity for attackers in a web or service context. The EPSS score is not available, but the lack of a KEV listing does not diminish the risk inherent in a high‑CVSS flaw. Exploitation requires that an attacker can influence the ITemplateLoader behavior or the request context that leads to template rendering; once a context is reused, a stale cache entry can be coerced into revealing privileged data. The attack vector is likely application‑side, with an attacker manipulating requests that trigger template rendering and causing context reuse to access the stale cache.

Generated by OpenCVE AI on August 16, 2026 at 15:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Scriban library to version 7.0.0 or later, which clears CachedTemplates during TemplateContext.Reset()
  • If an upgrade is not immediately possible, configure the application to avoid reusing TemplateContext instances across requests or disable caching by clearing the CachedTemplates dictionary manually after each render
  • Ensure that any ITemplateLoader implementations do not expose request‑dependent data or file paths, and enforce strict path validation so that even a stale cache cannot retrieve unauthorized files

Generated by OpenCVE AI on August 16, 2026 at 15:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 16 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Scriban before 7.0.0 Authorization Bypass via Stale Include Cache
Weaknesses CWE-226
References
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'}

cvssV4_0

{'score': 9.2, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-16T13:14:15.049Z

Reserved: 2026-08-16T12:56:02.577Z

Link: CVE-2026-74791

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-16T14:16:57.183

Modified: 2026-08-16T14:16:57.183

Link: CVE-2026-74791

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-16T15:15:04Z

Weaknesses
  • CWE-226

    Sensitive Information in Resource Not Removed Before Reuse