🇰🇷 한글 설명
Go 언어용 Excel 라이브러리인 Excelize 2.1.0에서 2.11.0 버전 사이에서 발생하는 취약점입니다. Zip64 압축 해제 크기 계산 시 uint64 값이 int64로 변환되면서 음수 값이 발생하며, 이로 인해 크기 제한 검사를 우회하고 메모리 할당 과정에서 패닉(Panic)을 유발할 수 있습니다.
💡 쉬운 설명
엑셀 파일을 읽을 때 파일 크기 정보를 잘못 계산하여 프로그램이 갑자기 멈추게 만드는 오류입니다. 공격자가 특수하게 조작된 엑셀 파일을 보내면 프로그램이 강제로 종료될 수 있습니다.
🇺🇸 원문 (English)
Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. From 2.1.0 to 2.11.0, a Zip64 uncompressed size with the high bit set is converted from uint64 to a negative int64 before signed size-limit checks and allocation. ReadZipReader obtains UncompressedSize64 through FileInfo.Size and passes the wrapped negative value to readFile. When a crafted Zip64 entry declares an uncompressed size from 2^63 through 2^64-1 and the workbook is opened, the negative size bypasses unzip limits and reaches make as a negative capacity, allowing an attacker to panic during workbook opening. No fixed version is available as of this review.
📍 영향받는 시스템
Excelize library (Go language) versions 2.1.0 to 2.11.0
⚔️ 공격 벡터
조작된 Zip64 엔트리가 포함된 엑셀 파일을 열어 프로그램의 패닉을 유도하는 방식
🛡️ 대응 방법
현재 수정 버전이 없으므로, 신뢰할 수 없는 엑셀 파일의 업로드 및 처리를 제한하거나 라이브러리 업데이트를 주시해야 합니다.
🔧 검증 코드
출력된 버전이 2.1.0 이상 2.11.0 이하인지 확인하여 취약 여부를 판단합니다.
go list -m github.com/xuri/excelize/v2 2>/dev/null