chore(deps): update dependency scriban.signed to v7 [security] #131
Closed
renovate
wants to merge 1 commits from
renovate/nuget-scriban.signed-vulnerability into main
pull from: renovate/nuget-scriban.signed-vulnerability
merge into: :main
:main
:renovate/dotnet-monorepo
:renovate/meziantou.analyzer-3.x
:renovate/lucene.net
:renovate/sqlitepclraw.bundle_e_sqlite3-3.x
:renovate/cliwrap-3.x
:913-scripted-playout-401
:release/v26.15.0-notes
:issue-806-guard-populations
:scratch/767b-poisoned
:scratch/767b-control
:release/v26.14.0-notes
:release/v26.14.0
:docs/510-skill-logo-bug-policy
:fix/510-watermark-resolution-policy
:fix/629-verdict-classifier-falseopens
:fix/609-decisions-edit-token-scope
:issue-135-clear-to-none
:release/v26.12.0-notes
:fix/409b-lastscan-api-parity
:fix/401-updatechannel-mirror-422
:fix/327-playlist-rename-validation
:fix/410-scancancel-log-level
:fix/409-447-librariesscreen-neverscanned
:fix/338-zap-exit-code
:fix/367-plex-budget-message
:fix/310-debom-legacy-cs
:ci/604-lane-rebalance
:feat/388-design-mirror
:feat/247-test-ownership
:feat/247-primary-action
:feat/357-player-owned-playback
:feat/357-jellyfin-plugin-poc
:fix/289-mcp-hardening
:issue58-mcp
:feat/244-channels-extract
:ci/auto-bump-prod-compose
:feat/multi-rerun-collections-api
:feat/collections-api
:feat/quick-wins
:feat/185-docs-part2
:feat/140-collections-screen
:feat/146-channel-edit
:feat/147-classic-ui-link
:issue22-renovate-dashboard
:feat/91-cutover
:feat/63-composite-create
:feat/65-library-browse
:feat/85-epg
:feat/86-schedule-editor
:feat/109-dashboard-data
:feat/99-session-tracking
:fix/dockerfile-node-tag
:feat/59-spa-foundation
:docs/59-ui-redesign-brief
:feat/102-json-guide
:feat/111-schedule-durations
:feat/104-artwork-upload
:feat/103-media-sources-api
:feat/playouts-read-api
:feat/108-health-api
:feat/105-picker-list-endpoints
:issue-97-channel-state-api
:issue42-jellyfin-musicvideos
:issue46-rest-api-error-contract
:dependabot/nuget/ErsatzTV.FFmpeg.Tests/multi-d307a2e06f
:qsv-improvements
:hdr-vulkan-cuda-test
No Reviewers
Labels
Clear labels
ad-hoc
api
bug
ci-cd
content
dependencies
enhancement
frontend
in-progress
jellyfin
parked
priority: high
priority: low
priority: medium
review
security
One-off / ad-hoc work not tracked by a dedicated issue
REST API / HTTP endpoints
Something isn't working
Build, test, deploy pipeline
Channel content / schedules / playlists
Dependency updates (Renovate)
New feature or improvement
ChicoryTV React SPA frontend
Claimed by an active session — do not pick up
Jellyfin tuner / IPTV integration
Excluded from automatic queue pickup; work only when explicitly selected
Adversarial review finding
Security / vulnerability fix
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: timothy/ersatztv#131
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
6.5.2→7.2.0Scriban: array.insert_at index parameter DoS bypasses LoopLimit and LimitToString
GHSA-24c8-4792-22hx
More information
Details
Summary
ArrayFunctions.InsertAtin Scriban allocatesindex - list.Countnull entries in a tight C#forloop with no bound onindex. The function is exposed to template authors asarray.insert_at, and the fill loop ignores every existing safety control:LoopLimit,LimitToString,ObjectRecursionLimit, andRecursiveLimit. A single template such as{{ [1] | array.insert_at 200000000 'x' | array.size }}causesOutOfMemoryExceptionin well under a second on a host with 1 GB of memory, even whenLoopLimitis set to10andLimitToStringis set to100. BecauseOutOfMemoryExceptionis 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, andstring.pad_right. The 7.0.0 hardening pass (dde661d"Apply LoopLimit to internal iteration paths" and4227fde"Harden string padding width limits") swept the equivalent loops inArrayFunctionsandStringFunctionsbut missedInsertAt.Details
Reproducible in 7.1.0 (latest tag) and on
masteratc8094b0.src/Scriban/Functions/ArrayFunctions.cs:369-386:The function is registered as the template builtin
array.insert_at(array.fmt-csand the standardArrayFunctionsScriptObject reflection registration). It is invoked from a template like[1] | array.insert_at 999999999 "x".Three properties combine to make this exploitable:
There is no context-aware overload. Comparable amplification primitives in this same file received a
(TemplateContext, SourceSpan, ...)overload that callsStepLoopper iteration (AddRange,Compact,Concat,Last,Limit,Offset,Reverse,Size,Sort,Uniq,Contains,Each,Filter,Join,Map,Any-- see commitdde661d).InsertAtwas not given that treatment. The singleIEnumerable, int, objectsignature is what the engine resolves to, so no host configuration changes its behaviour.The loop itself never consults
context.LoopLimit,context.LimitToString,context.RecursiveLimit, orcontext.ObjectRecursionLimit. There is no upstream call intocontext.StepLoop,context.CheckAbort, or any guard. Withindex = 200_000_000, the C# loop callsScriptArray.Add(null)200 million times on aList<object>whose capacity doubles geometrically; the JIT-compiled tight loop reaches the .NET array allocator faster than the GC can keep up.OutOfMemoryExceptionis the actual failure mode. Per Microsoft,OutOfMemoryExceptionand 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 aScriptRuntimeExceptionbecause 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 bareOutOfMemoryExceptionpropagates and crashes the AppDomain.The pattern that matches the existing fixes is to add a context-aware overload that validates
indexagainstLoopLimit(orLimitToStringfor the resulting array footprint) before the fill loop runs, and to mark the unsafe overload[ScriptMemberIgnore]:Same pattern as
ArrayFunctions.AddRange,Compact,Concat,Last,Limit, etc., introduced bydde661d, and asStringFunctions.PadLeft/PadRightintroduced by4227fde.PoC
Standalone .NET 9 console app referencing
Scriban7.1.0 from NuGet.poc.csproj:Program.cs:Build and run inside a memory-capped Docker container so the OOM is actual, not theoretical:
Observed output:
Two observations:
LoopLimit = 10andLimitToString = 100(effectively the most paranoid tuning a host could pick) makes no difference. The fill loop is in compiled C#, never goes throughStepLoop, and the result is aScriptArray, not a string, soLimitToStringis 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-p9crHigh 7.5,GHSA-c875-h985-hvrcHigh 7.5,GHSA-v66j-x4hw-fv9gHigh 7.5,GHSA-m2p3-hwv5-xpqwHigh 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).Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
scriban/scriban (Scriban.Signed)
v7.2.0Compare Source
Changes
🐛 Bug Fixes
c8094b0)🧰 Misc
7fdf19d)Full Changelog: 7.1.0...7.2.0
Published with dotnet-releaser
v7.1.0Compare Source
Changes
🐛 Bug Fixes
41e9491)🧰 Misc
Full Changelog: 7.0.6...7.1.0
Published with dotnet-releaser
v7.0.6Compare Source
Changes
🐛 Bug Fixes
37f226a)🧰 Misc
32ce64c)5946a93)73895d3)Full Changelog: 7.0.5...7.0.6
Published with dotnet-releaser
v7.0.5Compare Source
Changes
🐛 Bug Fixes
60ab0d9)Full Changelog: 7.0.4...7.0.5
Published with dotnet-releaser
v7.0.4Compare Source
Changes
🧰 Misc
e8b19f6)Full Changelog: 7.0.3...7.0.4
Published with dotnet-releaser
v7.0.3Compare Source
Changes
🐛 Bug Fixes
3f49de5)Full Changelog: 7.0.2...7.0.3
Published with dotnet-releaser
v7.0.2Compare Source
v7.0.1Compare Source
v7.0.0Compare Source
Changes
✨ New Features
570466a)a58550f)e5f6950)035db9a)🐛 Bug Fixes
7327154)a12cd0b)e4693e7)d56dc4e)4cb135a)de47d8a)ebfc405)25d148a)🧰 Maintenance
bafc1b5)🧰 Misc
8939dde)4227fde)760dc21)f55280a)099cb04)8180fb6)9856321)2d01bd1)dde661d)b6c65c7)9abb65b)d384108)ecca082)2f99ca6)b357166)1df80f7)3ec006c)8557aad)3f08079)0c22917)f2ea38f)b3f915e)Full Changelog: 6.6.0...7.0.0
Published with dotnet-releaser
v6.6.0Compare Source
Changes
✨ New Features
8d23abb)b5ac4bf) by @skdishansachin🐛 Bug Fixes
8894352)🧰 Misc
a6fe607) by @skdishansachinFull Changelog: 6.5.8...6.6.0
Published with dotnet-releaser
v6.5.8Compare Source
Changes
🚀 Enhancements
🧰 Misc
Includeremove magic checks (PR #651) by @BenkeiFull Changelog: 6.5.7...6.5.8
Published with dotnet-releaser
v6.5.7Compare Source
Changes
🚀 Enhancements
Includeusing PushLocal and PopLocal Part 2 (PR #650) by @BenkeiFull Changelog: 6.5.6...6.5.7
Published with dotnet-releaser
v6.5.6Compare Source
Changes
🐛 Bug Fixes
Includeusing PushLocal and PopLocal (PR #649) by @Benkei6513395)🧰 Misc
Full Changelog: 6.5.5...6.5.6
Published with dotnet-releaser
v6.5.5Compare Source
Changes
🐛 Bug Fixes
Includenamed arg values being lost for nested includes (PR #643) by @meld-cpFull Changelog: 6.5.4...6.5.5
Published with dotnet-releaser
v6.5.4Compare Source
Changes
✨ New Features
6ccb65f)f9afab3)b1072d7)11cbaca)4b3f041)🐛 Bug Fixes
📚 Documentation
ce0a2b6)🧰 Misc
0592e64)5b9f511)18331e9)Full Changelog: 6.5.3...6.5.4
Published with dotnet-releaser
v6.5.3Compare Source
Changes
🐛 Bug Fixes
577e2d4)📦 Dependencies
fc29ec6)🧰 Misc
f00a6bb)Full Changelog: 6.5.2...6.5.3
Published with dotnet-releaser
Configuration
📅 Schedule: (in timezone Europe/Brussels)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
Closing as obsolete: main already carries Scriban.Signed 7.2.5 (commit
47c3c3b5,fix/scriban-ghsa-5wr9), which supersedes this 7.2.0 bump and resolves GHSA-5wr9-m6jw-xx44. Renovate will confirm on its next run.Pull request closed