Limit the containment check depth

This fixes CVE-2026-40612.
This commit is contained in:
itchyny committed 2026-04-24 22:02:24 +09:00
1 parent 870207323d
commit d1a12569d9
3 files changed
+40 -14

No files matched your search

+9
View File
@@ -2593,3 +2593,12 @@ null
try delpaths([[range(10001) | 0]]) catch .
null
"Path too deep"
# regression test for CVE-2026-40612
reduce range(10000) as $_ ([]; [.]) | contains([[]])
null
true
try (reduce range(10001) as $_ ([]; [.]) as $x | $x | contains($x)) catch .
null
"Containment check too deep"