CVE-2026-74788: Scriban before 7.0.0 Denial of Service via string.pad_left/pad_right

Published Aug 16, 2026
·
Updated

Scriban before 7.0.0 (affected versions <= 6.6.0) contains an uncontrolled memory allocation vulnerability in the string.padleft and string.padright template functions, which perform no validation on the width parameter before delegating to .NET's String.PadLeft/PadRight. When an application exposes Scriban to untrusted template input, an attacker can supply an arbitrarily large width value (e.g., 500,000,000) to trigger ~1GB memory allocations in a single call, resulting in OutOfMemoryException and denial of service. The TemplateContext.LimitToString limit does not prevent this because it is only enforced after the string has been fully allocated.

Affected Software

1 affected component
Scriban<=6.6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Scriban to a version that resolves this vulnerability.

    Fixed in 7.0.0
  2. Configuration

    Do not rely on TemplateContext.LimitToString to mitigate this issue, because enforcement happens only after the string has been fully allocated (OOM can occur before the limit is applied). Apply a different mitigation for untrusted template input.

    Scriban TemplateContext LimitToString = unchanged
  3. Compensating control

    If your application exposes Scriban to untrusted template input, restrict/validate the template arguments/variables that flow into string.pad_left and string.pad_right so that the width parameter cannot be arbitrarily large (e.g., block or cap width values like 500,000,000 that would trigger ~1GB allocations).

Event History

Aug 16, 2026
CVE Published
via MITRE·01:14 PM
Data Sourced
via MITRE·01:14 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-74788?

The severity of CVE-2026-74788 is classified as high with a CVSS score of 7.5.

2

How do I fix CVE-2026-74788?

To fix CVE-2026-74788, update Scriban to version 7.0.0 or later.

3

What type of vulnerability is CVE-2026-74788?

CVE-2026-74788 is a denial of service vulnerability caused by uncontrolled memory allocation in template functions.

4

What are the affected versions of Scriban for CVE-2026-74788?

Affected versions of Scriban for CVE-2026-74788 are those prior to version 7.0.0, specifically up to version 6.6.0.

5

What are the consequences of exploiting CVE-2026-74788?

Exploiting CVE-2026-74788 can lead to a denial of service condition in applications using the affected Scriban versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203