Scriban: array.insert_at index parameter DoS bypasses LoopLimit and LimitToString
A denial-of-service (DoS) vulnerability exists in Scriban's array.insert_at template function due to an unbounded loop that allocates null entries without respecting configured loop or recursion limits. This can cause an OutOfMemoryException that terminates the host process. The issue affects Scriban versions prior to 7.2.0 and is exploitable by template authors specifying very large index values in array.insert_at calls.
AI Analysis
Technical Summary
The vulnerability in Scriban arises from the ArrayFunctions.InsertAt method, which fills the array with null entries up to the specified index without enforcing any loop or recursion limits such as LoopLimit or LimitToString. This unbounded allocation loop can be triggered by templates using array.insert_at with a very large index parameter, causing rapid memory exhaustion and an OutOfMemoryException. Unlike other similar functions hardened in version 7.0.0, InsertAt lacks a context-aware overload that would enforce limits, making it possible to bypass existing safety controls. The failure mode is severe because OutOfMemoryException is generally not catchable and leads to host process termination. The vulnerability affects Scriban versions before 7.2.0.
Potential Impact
Exploitation causes the host process running the Scriban template renderer to crash due to an OutOfMemoryException triggered by unbounded memory allocation. This results in a denial-of-service condition where the application or service hosting the template engine is terminated unexpectedly. The vulnerability does not require privileges or user interaction and can be triggered by crafted templates specifying large index values in array.insert_at calls.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The recommended fix pattern is to add a context-aware overload of InsertAt that enforces LoopLimit and other safety controls before performing allocations, and to mark the unsafe overload as ignored for script usage. Until a patch is available, avoid processing untrusted templates that use array.insert_at with large index values to prevent potential denial-of-service. Monitor vendor communications for an official fix release.
Scriban: array.insert_at index parameter DoS bypasses LoopLimit and LimitToString
Description
A denial-of-service (DoS) vulnerability exists in Scriban's array.insert_at template function due to an unbounded loop that allocates null entries without respecting configured loop or recursion limits. This can cause an OutOfMemoryException that terminates the host process. The issue affects Scriban versions prior to 7.2.0 and is exploitable by template authors specifying very large index values in array.insert_at calls.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Scriban arises from the ArrayFunctions.InsertAt method, which fills the array with null entries up to the specified index without enforcing any loop or recursion limits such as LoopLimit or LimitToString. This unbounded allocation loop can be triggered by templates using array.insert_at with a very large index parameter, causing rapid memory exhaustion and an OutOfMemoryException. Unlike other similar functions hardened in version 7.0.0, InsertAt lacks a context-aware overload that would enforce limits, making it possible to bypass existing safety controls. The failure mode is severe because OutOfMemoryException is generally not catchable and leads to host process termination. The vulnerability affects Scriban versions before 7.2.0.
Potential Impact
Exploitation causes the host process running the Scriban template renderer to crash due to an OutOfMemoryException triggered by unbounded memory allocation. This results in a denial-of-service condition where the application or service hosting the template engine is terminated unexpectedly. The vulnerability does not require privileges or user interaction and can be triggered by crafted templates specifying large index values in array.insert_at calls.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The recommended fix pattern is to add a context-aware overload of InsertAt that enforces LoopLimit and other safety controls before performing allocations, and to mark the unsafe overload as ignored for script usage. Until a patch is available, avoid processing untrusted templates that use array.insert_at with large index values to prevent potential denial-of-service. Monitor vendor communications for an official fix release.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-24c8-4792-22hx
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["NuGet"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a42ed4c27e9c79719935e07
Added to database: 06/29/2026, 22:10:20 UTC
Last enriched: 06/29/2026, 22:27:58 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 35
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.