PT-2026-73156 · Scriban · Scriban
CVSS v4.0
8.7
High
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Scriban versions prior to 7.0.0
Description
An uncontrolled memory allocation issue exists in the
string.pad left() and string.pad right() template functions. These functions fail to validate the width parameter before delegating the operation to .NET's String.PadLeft/PadRight. An attacker providing untrusted template input can specify an arbitrarily large width value to trigger massive memory allocations, leading to an OutOfMemoryException and a denial of service. The TemplateContext.LimitToString limit is ineffective in this scenario as it is only enforced after the memory allocation has occurred.Recommendations
Update Scriban to version 7.0.0 or later.
As a temporary mitigation, restrict the use of
string.pad left() and string.pad right() functions when processing untrusted template input.Exploit
Fix
DoS
Allocation of Resources Without Limits
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Scriban