Limit recursive object merge depth to prevent stack overflow

This fixes CVE-2026-43896.
This commit is contained in:
itchyny committed 2026-05-05 22:44:02 +09:00
1 parent 33d7bce321
commit 532ccea608
2 files changed
+32 -2

No files matched your search

+9
View File
@@ -2602,3 +2602,12 @@ true
try (reduce range(10001) as $_ ([]; [.]) as $x | $x | contains($x)) catch .
null
"Containment check too deep"
# regression test for CVE-2026-43896
reduce range(10000) as $_ ({}; {a: .}) as $x | $x * $x | length
null
1
try (reduce range(10001) as $_ ({}; {a: .}) as $x | $x * $x) catch .
null
"Object merge too deep"