🇰🇷 한글 설명
Podgrab의 WebSocket 핸들러 내에서 공유 맵(activePlayers, allConnections)에 대한 동기화되지 않은 동시 접근으로 인해 인증되지 않은 서비스 거부(DoS) 취약점이 발생합니다. 공격자가 /ws 엔드포인트로 다수의 WebSocket 연결을 생성하고 메시지를 반복 전송하면 Go 런타임 데이터 레이스가 발생하여 프로세스가 충돌하고 서비스가 중단됩니다.
💡 쉬운 설명
프로그램이 데이터를 처리할 때 여러 작업이 동시에 같은 공간을 건드려 충돌이 발생하는 문제입니다. 공격자가 가짜 연결을 대량으로 보내면 프로그램이 갑자기 멈춰버려 서비스를 이용할 수 없게 됩니다.
🇺🇸 원문 (English)
Podgrab contains an unauthenticated denial-of-service vulnerability caused by unsynchronized concurrent access to shared maps (activePlayers and allConnections) in its WebSocket handler, where Wshandler and HandleWebsocketMessages goroutines read and write these maps without a mutex. A remote attacker can open multiple WebSocket connections to the /ws endpoint and send messages in a loop to trigger a Go runtime data race that crashes the process, causing a denial of service that requires operator intervention to restore service.
📍 영향받는 시스템
Podgrab (WebSocket 핸들러를 사용하는 버전)
⚔️ 공격 벡터
인증되지 않은 원격 공격자가 /ws 엔드포인트로 다수의 WebSocket 연결 및 메시지 루프 전송
🛡️ 대응 방법
공유 맵 접근 시 Mutex를 사용하여 동기화 처리를 하거나, Go의 race detector를 통해 수정된 패치 버전으로 업데이트
🔧 검증 코드
명령어 실행 시 WebSocket 연결이 정상적으로 수립되는지 확인하여 해당 엔드포인트의 활성화 여부를 점검합니다.
curl -s http://<target_ip>:<port>/ws | grep -q 'HTTP/1.1 101 Switching Protocols' && echo 'WebSocket endpoint active'