🇰🇷 한글 설명
Phoenix Framework의 Presence JavaScript 클라이언트에서 비정상적인 조건에 대한 검증 미흡으로 인해 발생하는 취약점입니다. 공격자가 특정 채널에 특수하게 조작된 키를 사용하여 접속하면, 해당 채널을 시청하는 모든 사용자의 클라이언트에서 지속적인 서비스 거부(DoS) 상태가 발생합니다.
💡 쉬운 설명
공격자가 특수한 이름을 가진 아이디로 채팅방에 들어오면, 그 방에 있는 모든 사람의 화면이 멈추거나 기능이 작동하지 않게 됩니다. 이는 프로그램이 아이디를 확인하는 과정에서 시스템 내부의 중요한 이름을 아이디로 착각하여 오류가 발생하기 때문입니다.
🇺🇸 원문 (English)
Improper Check for Unusual or Exceptional Conditions vulnerability in phoenixframework phoenix (Presence JavaScript client) allows an attacker with ordinary channel access to cause a persistent client-side denial of service against every viewer of a presence channel topic.
This vulnerability is associated with program files assets/js/phoenix/presence.js and program routines Presence.syncState and Presence.syncDiff.
The Phoenix JavaScript presence client checks whether a presence already exists with a bare truthiness test (state[key]) instead of an own-property check. Presence keys can be attacker-controlled, because applications track presences under a username or id supplied by the client. A user who joins a channel choosing a key that is an Object.prototype member name (__proto__, constructor, toString, hasOwnProperty, and similar) makes that lookup return JavaScript's built-in Object.prototype instead of undefined. Because the prototype is truthy, the code treats it as an existing presence and reads .metas.map(...) off it, which throws an uncaught TypeError.
The exception propagates out of the presence message handler, so the local state is never updated and onSync() never fires. Because the malicious key is tracked on the server, it is re-pushed on every presence update and keeps re-throwing, so presence sync stays broken for every viewer of that channel topic until the attacker leaves. Both syncState and syncDiff use the same unsafe existence-check pattern. The impact is limited to the affected topic and is a read-time confusion of the prototype object, not a mutation of Object.prototype (it is not prototype pollution).
This issue affects phoenix: from 1.2.0-rc.0 before 1.5.15, from 1.6.0-rc.0 before 1.6.17, from 1.7.0-rc.0 before 1.7.24, and from 1.8.0-rc.0 before 1.8.9; phoenix: from 1.2.0-rc.0 before 1.5.15, from 1.6.0-rc.0 before 1.6.17, from 1.7.0-rc.0 before 1.7.24, and from 1.8.0-rc.0 before 1.8.9.
📍 영향받는 시스템
phoenix: 1.2.0-rc.0 ~ 1.5.15 미만, 1.6.0-rc.0 ~ 1.6.17 미만, 1.7.0-rc.0 ~ 1.7.24 미만, 1.8.0-rc.0 ~ 1.8.9 미만
⚔️ 공격 벡터
공격자가 채널 접속 시 __proto__, constructor 등 Object.prototype의 속성 이름을 사용자 키(Key)로 사용하여 전송
🛡️ 대응 방법
Phoenix Framework를 최신 보안 패치 버전(1.5.15, 1.6.17, 1.7.24, 1.8.9 이상)으로 업데이트
🔧 검증 코드
출력된 phoenix 패키지의 버전이 취약한 버전 범위에 포함되는지 확인
npm list phoenix || yarn list --pattern phoenix
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
💻 영향받는 소프트웨어
IBM WebSphere Application Server