Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

websockets/ws
master @ a2f4e7c
7
Fixes
5
CVEs
HIGH
Peak severity
83.3%
Coverage
Highlights
Denial of Service: 3 prior fixes. Scrutinize any change in this area.
lib/websocket.js: most-fixed (4 issues). Treat as high-risk during review.
5 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Credential Leakage: The client component has repeatedly suffered from vulnerabilities where sensitive authentication headers (Authorization, Cookie) and Host headers were preserved and leaked across security boundaries during HTTP redirection, including standard TCP/Unix socket cross-boundaries, wss-to-ws downgrades, and cross-origin destinations.
Denial of Service: Uncontrolled resource consumption can occur when the receiver buffers excessive fragments or chunks without enforcing strict limits, resulting in memory exhaustion (OOM) crashes as tracked under CVE-2026-48779.
Information Disclosure: Passing a non-Uint8Array TypedArray as a WebSocket close frame reason caused uninitialized memory disclosure (CVE-2026-45736) due to unsafe allocation via Buffer.allocUnsafe instead of safe initialization and type verification.