/

CVE-2026-73061

Severity:

CRITICAL RISK

(9.8)

Access Control Bypass (CWE-284) in Scriban Templates

CVE-2026-73061

Deferred

Vulnerability type

Category:

Access Control Bypass

CWE:

CWE-284

Impact:

Unauthorized Object Modification and Data Integrity Loss

Severity:

CRITICAL RISK

(9.8)

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 contains an access-modifier bypass in its TypedObjectAccessor that can let template code write properties without respecting setter visibility. If an attacker can influence or execute templates with access to live CLR objects, they may alter private, internal, init-only, or publicly settable properties and persist unauthorized state changes.

Affected context

The issue occurs in applications that use Scriban to render templates while exposing CLR objects to template code. It becomes risky when template content is attacker-controlled or insufficiently trusted and the rendering context contains mutable host objects whose properties influence application behavior, authorization, configuration, or persisted state.

Exploit preconditions

  • Attack surface: Scriban template evaluation with CLR objects available in the template context
  • Required access: The ability to create, modify, or cause execution of a template in the affected rendering workflow
  • Trigger point: Property assignment performed during template rendering
  • Why exploitation is possible: TypedObjectAccessor permits writes without consistently enforcing setter visibility or initialization restrictions, allowing template code to modify properties that should not be writable

Why this happens

The vulnerability is caused by an access-control enforcement failure in the object-access layer used by template evaluation. Property writes are permitted without reliably checking whether the corresponding CLR setter is public, private, internal, or restricted to initialization, and broad assignment can also affect ordinary public-setter properties. This maps to CWE-284: Improper Access Control, because the template execution context does not adequately enforce the intended authority boundaries for object mutation.

Potential impact

  • Application state may be modified without the intended authorization checks
  • Private, internal, or init-only properties may be altered at runtime
  • Security-relevant configuration or policy objects could be tampered with
  • Persistent data integrity may be affected if modified objects are later stored
  • Application behavior could be redirected or degraded
  • Multi-tenant isolation or workflow assumptions may be weakened

General mitigation guidance

Mitigation generally focuses on reducing the authority granted to templates and enforcing property-write policy at a trusted boundary.

Common defensive patterns include:

  • Exposing dedicated, immutable view models rather than live domain or service objects
  • Allowing template access only to explicitly approved properties and operations
  • Treating template content as untrusted input and separating it from privileged execution contexts
  • Enforcing authorization and validation again before state changes are committed
  • Avoiding reliance on private, internal, or init-only modifiers as the sole protection against template writes
  • Running template rendering with least-privilege application identities and narrowly scoped data access

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis and dependency review for template engines that expose reflective object access
  • Code review checks for passing live mutable objects, services, or security-sensitive models into templates
  • Tests that attempt writes to private, internal, init-only, and public properties and verify the intended policy
  • Runtime audit logging for template-driven changes to sensitive application objects
  • Policy enforcement that restricts template contexts to approved data-transfer or immutable types
  • Automated security review tools that flag unrestricted reflection and dynamic property assignment

Sources

SourceLink
github.comgithub.com/scriban/scriban/security/advisories/GHSA-7jvp-hj45-2f2m
vulncheck.comvulncheck.com/advisories/scriban-before-arbitrary-property-write-via-typedobjectaccessor

Frequently asked

questions

It can be exploitable through a remote application workflow when untrusted users can submit or influence templates that are subsequently rendered with mutable CLR objects. The exact scope depends on how the host application exposes Scriban.

An attacker generally needs a way to supply, modify, or trigger execution of a template and a rendering context containing objects whose properties affect application state.

Use explicitly allowlisted, immutable view models for template rendering and enforce authorization before any state is changed or persisted.

Keep untrusted templates isolated from privileged objects, test setter and mutation boundaries, apply least privilege, and monitor template-driven changes to security-sensitive state.

Find out what's already
exploitable in your codebase.