/

CVE-2026-124438

Severity:

HIGH RISK

(7.4)

Information Disclosure (CWE-200) in Scriban Template Engine

CVE-2026-124438

Awaiting Analysis

Vulnerability type

Category:

Reflection-Based Information Disclosure and Object Manipulation

CWE:

CWE-200

Impact:

Sensitive Information Disclosure and Potential Object Manipulation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Scriban versions before 7.5.2 allow template authors to use reflection member accessors on imported function values to inspect .NET delegate internals. Depending on the functions exposed by the host application, this may reveal sensitive data such as captured closure values or assembly paths, and may allow service properties to be overwritten.

Affected context

The issue occurs in Scriban environments that let templates access imported .NET delegates through reflection-capable member accessors. It becomes risky when template authors are untrusted or less trusted than the application hosting Scriban, and exposed delegates contain sensitive captured state or references to mutable service properties.

Exploit preconditions

  • Attack surface: Scriban template evaluation in an application that imports .NET functions or delegates.
  • Required access: Ability to author or modify a template that the application evaluates.
  • Trigger point: Template evaluation that uses array.map and reflection member accessors on imported delegates.
  • Why exploitation is possible: Delegate members such as Target, Method, or ReturnType may be accessible, allowing templates to inspect internal values or interact with exposed object state.

Why this happens

The underlying issue is insufficient restriction of reflection-based member access on function values exposed to templates. When templates can inspect .NET delegate internals, implementation details and captured state may cross the boundary between the host application and template code. This is associated with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor; access to mutable service properties may also create object-manipulation risks.

Potential impact

  • Templates may disclose captured closure secrets or other sensitive values.
  • Templates may expose assembly paths and implementation details.
  • Templates could overwrite accessible service properties, potentially affecting application behavior.
  • Revealed internals may help an attacker identify further weaknesses in the host application.

General mitigation guidance

Common defensive patterns include:

  • Restricting or disabling reflection-based member access for untrusted templates.
  • Exposing narrow, purpose-built template functions instead of general .NET delegates or service objects.
  • Avoiding sensitive data in delegate targets and captured closures.
  • Limiting templates to the minimum capabilities and data required for their task.
  • Separating template execution from privileged application state and applying least privilege.

How teams detect issues like this

Review template engine configuration for reflection-capable member access and inspect which delegates and objects are exposed to templates. Static analysis and code review can look for broad imports, captured secrets, and mutable service properties reachable from template contexts. Policy checks can require explicit approval for new template-visible functions and enforce restricted access for untrusted templates.

Sources

SourceLink
github.comgithub.com/scriban/scriban/security/advisories/GHSA-hvr4-4p37-494f
vulncheck.comvulncheck.com/advisories/scriban-before-7.5.2-delegate-target-exposure-via-array-map-member-access

Frequently asked

questions

Typically, a person who can author or modify a template that is evaluated by an affected Scriban application.

Not necessarily. The key prerequisite is the ability to supply or change a template; the application must also expose relevant delegates or objects during evaluation.

Restrict reflection access and expose only narrowly scoped, purpose-built functions and data to templates.

Treat templates as potentially untrusted code, minimize their capabilities and access to sensitive state, and review template-visible objects and functions as part of security testing.

Find out what's already
exploitable in your codebase.