Repository navigation
v3.66.2 — security hardening: bearer parsing, verification codes, protocol stripping
Security patch: @claude-flow/cli, claude-flow, ruflo 3.66.2, with the bundled @claude-flow/mcp 3.1.5 and @claude-flow/security 3.0.6 (also published standalone).
Security
- Bearer tokens are parsed in linear time (
@claude-flow/mcp). The HTTP and WebSocket transports matchedAuthorizationwith/^Bearer\s+(.+)$/i. That pattern backtracks quadratically on a long run of whitespace followed by a line break (CodeQL js/polynomial-redos). Node's HTTP parser already rejects line breaks in header values, so this is hardening rather than a reachable denial of service. Both transports now use a prefix compare andtrimStart, and refuse headers over 8 KB. - Verification codes are uniform (
@claude-flow/security).TokenGenerator.generateVerificationCode()usedbyte % 10, so digits 0-5 came up 26/256 of the time and 6-9 only 25/256. Each digit now comes fromcrypto.randomInt(10). sanitizeStringcannot be tricked into rebuilding a protocol (@claude-flow/security). One pass turnedjavajavascript:script:intojavascript:. It now stripsjavascript:,vbscript:anddata:until none remain.terminal_createsession ids come fromcrypto.randomBytesrather thanMath.random.