Files
turso/serverless
Pekka Enberg 230f652b5b deps: update brace-expansion to fix quadratic parsing of trailing braces
Expanding input shaped like {a}}}}...,z} takes time quadratic in the
number of literal } characters. The parser rewrites the string and
restarts the scan once per brace, and each rewrite also grows the
working string by about 25 characters. A 128 KB pattern blocks the
event loop for close to half a minute. The max and maxLength caps do
not help because the cost is in parsing, before any results exist.

Every major line in use here is affected, so this moves each pinned
copy to the patched release on its own line: 1.1.21, 2.1.7 and 5.0.12.
npm also re-synced stale metadata for the locally linked
@tursodatabase packages while rewriting the lockfiles.

Tests: ran the advisory's reproduction against serverless/javascript
before and after npm ci. On 2.1.4, n=32000 took 2358 ms. On 2.1.7 it
took 15 ms.
2026-10-14 09:49:10 +03:00
..
…
…