🇰🇷 한글 설명
protobufjs는 protobuf 정의를 JavaScript 함수로 컴파일합니다. 8.6.0 및 7.6.3 이전 버전은 런타임 헬퍼와 충돌할 수 있는 스키마 파생 이름(hasOwnProperty, $type, rpcCall 등)을 허용하여, 디코딩 후처리, 검증, 객체 변환, JSON 직렬화, RPC 헬퍼 호출 시 예외 발생 또는 재귀 호출을 유발할 수 있습니다. 8.6.0 및 7.6.3에서 수정되었습니다.
💡 쉬운 설명
protobufjs 라이브러리가 특정 이름의 필드나 메서드를 잘못 처리해 프로그램이 비정상 종료되거나 무한 재귀에 빠질 수 있습니다. 최신 버전으로 업데이트하면 해결됩니다.
🇺🇸 원문 (English)
protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 8.6.0 and 7.6.3, protobufjs accepted certain schema-derived names that could collide with properties used by protobufjs runtime helpers. The known affected names are fields named hasOwnProperty, field or oneof names such as $type when loaded through protobufjs JSON/reflection descriptors, and service methods whose generated helper name is rpcCall. When affected message or service types were used, protobufjs could read schema-controlled data where it expected an own-property helper, reflected type metadata, or the base RPC helper. This could cause deterministic exceptions or recursive calls in affected decode post-checks, verification, object conversion, reflected JSON serialization, or protobufjs RPC helper invocation. This vulnerability is fixed in 8.6.0 and 7.6.3.
📍 영향받는 시스템
protobufjs 8.6.0 미만 및 7.6.3 미만 버전을 사용하는 Node.js 및 JavaScript 애플리케이션
⚔️ 공격 벡터
악의적으로 조작된 protobuf 스키마나 메시지 정의를 전달해 충돌 이름을 사용하게 하여 서비스 거부(예외/재귀)를 유발
🛡️ 대응 방법
protobufjs를 8.6.0 이상 또는 7.6.3 이상으로 업그레이드 (npm update protobufjs)
🔧 검증 코드
출력된 버전이 8.6.0 미만 또는 7.6.3 미만이면 취약하므로 업그레이드가 필요하며, 8.6.0 이상 또는 7.6.3 이상이면 패치된 버전입니다.
npm ls protobufjs 2>/dev/null | grep protobufjs