🇰🇷 한글 설명
StableLib의 @stablelib/cbor 디코더에서 중첩된 CBOR 구조를 처리할 때 최대 중첩 깊이를 제한하지 않는 문제가 발견되었습니다. 공격자가 매우 깊은 구조의 데이터를 전송할 경우 자바스크립트 호출 스택이 고갈되어 디코딩 예외가 발생하고 프로세스가 종료될 수 있습니다. 이 문제는 2.0.4 버전에서 수정되었습니다.
💡 쉬운 설명
데이터 안에 데이터가 끝없이 반복되는 구조를 보내서 프로그램이 감당하지 못하게 만드는 공격입니다. 이로 인해 프로그램이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
StableLib is a stable library of useful TypeScript and JavaScript code. Prior to 2.0.4, the @stablelib/cbor decoder recursively processes nested CBOR arrays, maps, and tags through _decodeValue() without enforcing a maximum nesting depth. A sufficiently deep structure exhausts the JavaScript call stack, causing a decoding exception and potentially terminating an uncaught request worker or process. This issue is fixed in version 2.0.4.
📍 영향받는 시스템
@stablelib/cbor 2.0.4 미만 버전
⚔️ 공격 벡터
악의적으로 설계된 깊은 중첩 구조의 CBOR 데이터를 디코더에 전송
🛡️ 대응 방법
@stablelib/cbor 라이브러리를 2.0.4 버전 이상으로 업데이트
🔧 검증 코드
출력된 결과에서 @stablelib/cbor의 버전이 2.0.4 미만인지 확인