🇰🇷 한글 설명
node-re2 라이브러리 1.26.1 미만 버전에서 버퍼의 마지막 바이트가 불완전한 UTF-8 시퀀스로 구성될 경우, 디코딩 과정에서 할당된 버퍼의 범위를 벗어나 읽는 취약점이 존재합니다. 이로 인해 경계 외 읽기(Out-of-bounds read)가 발생하여 인접한 메모리 내용이 노출될 수 있습니다.
💡 쉬운 설명
데이터를 읽는 과정에서 글자가 중간에 잘려 있으면, 컴퓨터가 잘못된 위치까지 데이터를 더 읽으려고 시도하는 문제입니다. 이 과정에서 원래 읽으면 안 되는 메모리 속의 민감한 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
node-re2 provides RE2 regular expression bindings for Node.js. Prior to version 1.26.1, passing a Buffer whose final bytes form a truncated (incomplete) multi-byte UTF-8 sequence could cause the native binding to read past the end of the allocated buffer while attempting to decode the final, incomplete code point. This could result in an out-of-bounds read and potential disclosure of adjacent memory contents. This issue is fixed in version 1.26.1.
📍 영향받는 시스템
node-re2 version < 1.26.1
⚔️ 공격 벡터
불완전한 UTF-8 시퀀스를 포함한 버퍼 데이터를 정규식 엔진에 입력하여 메모리 경계 외 읽기 유도
🛡️ 대응 방법
node-re2 라이브러리를 1.26.1 버전 이상으로 업데이트
🔧 검증 코드
출력된 결과에서 node-re2의 버전을 확인하여 1.26.1 미만인지 체크