GHSA-q6rr-fm2g-g5x8: Scriban: array * int (ScriptArray<T>.TryEvaluate) bypasses LoopLimit — incomplete fix for GHSA-c875-h985-hvrc, missed sibling of GHSA-24c8-4792-22hx
Scriban's array multiplication operator (array * integer) allows an attacker to cause excessive memory allocation without enforcement of iteration limits or overflow-safe arithmetic. This vulnerability enables denial-of-service by allocating multi-gigabyte arrays from small templates. It has existed since version 3.0.0 and remains present in version 7.2.0. The issue is due to missing LoopLimit checks and unchecked integer multiplication in the allocation size calculation. Attempts to allocate large arrays can cause out-of-memory exceptions wrapped as ScriptRuntimeException. This vulnerability is related to but distinct from previously fixed issues involving LoopLimit enforcement in Scriban.
AI Analysis
Technical Summary
The Scriban template engine's array multiplication operator (array * int) in ScriptArray<T>.TryEvaluate does not enforce the LoopLimit or LimitToString resource constraints and uses unchecked integer arithmetic for allocation size. This allows an attacker to specify a large integer multiplier that causes the allocation of a very large array, leading to denial-of-service via excessive memory consumption. The vulnerability has existed since the operator's introduction in version 3.0.0 and persists through versions 6.6.0, 7.0.0, and 7.2.0. Unlike sibling operations such as string * int and array.insert_at, which have LoopLimit protections, array * int lacks these guards. When allocation fails, the exception is wrapped and surfaced as a ScriptRuntimeException. No official patch or fix is currently documented for this issue.
Potential Impact
An attacker can cause a denial-of-service condition by triggering large memory allocations through the array * integer operator in Scriban templates. This can exhaust system memory, potentially crashing the host application or severely degrading performance. The vulnerability does not require privileges or user interaction and can be triggered remotely if untrusted templates are rendered. No code execution or data leakage is indicated. The impact is limited to resource exhaustion (DoS).
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid rendering untrusted templates that use the array multiplication operator with large integer values. Implement external resource usage monitoring and limit template input size where possible. Do not rely on Scriban's internal LoopLimit protections for this operator as they are currently incomplete.
GHSA-q6rr-fm2g-g5x8: Scriban: array * int (ScriptArray<T>.TryEvaluate) bypasses LoopLimit — incomplete fix for GHSA-c875-h985-hvrc, missed sibling of GHSA-24c8-4792-22hx
Description
Scriban's array multiplication operator (array * integer) allows an attacker to cause excessive memory allocation without enforcement of iteration limits or overflow-safe arithmetic. This vulnerability enables denial-of-service by allocating multi-gigabyte arrays from small templates. It has existed since version 3.0.0 and remains present in version 7.2.0. The issue is due to missing LoopLimit checks and unchecked integer multiplication in the allocation size calculation. Attempts to allocate large arrays can cause out-of-memory exceptions wrapped as ScriptRuntimeException. This vulnerability is related to but distinct from previously fixed issues involving LoopLimit enforcement in Scriban.
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 Scriban template engine's array multiplication operator (array * int) in ScriptArray<T>.TryEvaluate does not enforce the LoopLimit or LimitToString resource constraints and uses unchecked integer arithmetic for allocation size. This allows an attacker to specify a large integer multiplier that causes the allocation of a very large array, leading to denial-of-service via excessive memory consumption. The vulnerability has existed since the operator's introduction in version 3.0.0 and persists through versions 6.6.0, 7.0.0, and 7.2.0. Unlike sibling operations such as string * int and array.insert_at, which have LoopLimit protections, array * int lacks these guards. When allocation fails, the exception is wrapped and surfaced as a ScriptRuntimeException. No official patch or fix is currently documented for this issue.
Potential Impact
An attacker can cause a denial-of-service condition by triggering large memory allocations through the array * integer operator in Scriban templates. This can exhaust system memory, potentially crashing the host application or severely degrading performance. The vulnerability does not require privileges or user interaction and can be triggered remotely if untrusted templates are rendered. No code execution or data leakage is indicated. The impact is limited to resource exhaustion (DoS).
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid rendering untrusted templates that use the array multiplication operator with large integer values. Implement external resource usage monitoring and limit template input size where possible. Do not rely on Scriban's internal LoopLimit protections for this operator as they are currently incomplete.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-q6rr-fm2g-g5x8
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["NuGet"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a4c346127e9c79719600af8
Added to database: 07/06/2026, 23:04:01 UTC
Last enriched: 07/06/2026, 23:34:23 UTC
Last updated: 07/06/2026, 23:34:23 UTC
Views: 2
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.