🇰🇷 한글 설명
msgpack5 라이브러리 6.1.0 미만 버전에서 옵션 객체가 비어있거나 불완전할 경우 기본 프로토타입 보호 기능이 비활성화됩니다. 이로 인해 디코딩된 맵에 '__proto__' 키가 포함되어 있으면 객체의 프로토타입을 교체하여 상속된 속성이나 후속 동작을 변경할 수 있습니다.
💡 쉬운 설명
데이터를 읽어오는 과정에서 특수한 코드가 포함된 데이터를 보내면, 프로그램이 사용하는 내부 설정값을 몰래 바꿀 수 있는 취약점입니다. 이를 통해 프로그램의 동작을 예상치 못한 방식으로 조작할 위험이 있습니다.
🇺🇸 원문 (English)
msgpack5 is a msgpack v5 implementation for node.js and the browser. Prior to 6.1.0, constructing msgpack5 with an empty or partial options object disables the default protoAction: 'error' protection. A decoded map containing a __proto__ key can then replace the decoded object's prototype, potentially changing inherited properties or downstream behavior, although Object.prototype is not modified globally. This issue is fixed in version 6.1.0.
📍 영향받는 시스템
msgpack5 version < 6.1.0
⚔️ 공격 벡터
악의적으로 조작된 '__proto__' 키를 포함한 msgpack 데이터를 전송하여 객체의 프로토타입을 조작
🛡️ 대응 방법
msgpack5 라이브러리를 6.1.0 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 6.1.0 미만인지 확인
npm list msgpack5 | grep msgpack5