🇰🇷 한글 설명
Node.js용 오픈 소스 WebSocket 라이브러리인 ws에서 발생하는 취약점입니다. 특수하게 조작된 Sec-Websocket-Protocol 헤더 값을 사용하여 ws 서버의 성능을 크게 저하시킬 수 있습니다.
💡 쉬운 설명
공격자가 특수한 메시지를 보내 서버를 매우 느리게 만들어 정상적인 서비스를 방해할 수 있습니다. 이는 서버의 자원을 고갈시키는 일종의 서비스 거부 공격입니다.
🇺🇸 원문 (English)
ws is an open source WebSocket client and server library for Node.js. A specially crafted value of the `Sec-Websocket-Protocol` header can be used to significantly slow down a ws server. The vulnerability has been fixed in
[email protected] (https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff). In vulnerable versions of ws, the issue can be mitigated by reducing the maximum allowed length of the request headers using the [`--max-http-header-size=size`](https://nodejs.org/api/cli.html#cli_max_http_header_size_size) and/or the [`maxHeaderSize`](https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener) options.
📍 영향받는 시스템
ws 라이브러리 7.4.6 미만 버전
⚔️ 공격 벡터
Sec-Websocket-Protocol 헤더에 조작된 값을 포함하여 전송
🛡️ 대응 방법
ws 라이브러리를 7.4.6 이상 버전으로 업데이트하거나 HTTP 헤더 최대 크기 제한 옵션을 적용
🔧 검증 코드
출력된 결과에서 ws의 버전을 확인하여 7.4.6 미만인지 체크