fix(security): add upper bound to base64 scrub regex to prevent ReDoS (#3251)

Fixes #3250

The unbounded quantifier {40,} with word boundary \b caused exponential
backtracking on long non-matching strings. Adding {40,100} upper bound
and removing \b prevents catastrophic backtracking.

Agent: security-auditor

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-04-09 20:16:34 -07:00 committed by GitHub
parent eefd574f7e
commit 88c1f37d7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.32.2",
"version": "0.32.3",
"type": "module",
"bin": {
"spawn": "cli.js"