🇰🇷 한글 설명
Excelize 라이브러리의 checkSheet() 함수가 XML의 행 번호 속성값을 검증 없이 슬라이스 할당에 사용하여 발생하는 취약점입니다. 공격자가 조작된 XLSX 파일을 통해 과도한 메모리 할당을 유도하거나 런타임 패닉을 일으켜 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
엑셀 파일을 읽는 프로그램이 파일 안에 적힌 잘못된 행 번호를 그대로 믿고 너무 큰 메모리를 사용하려다 프로그램이 멈추는 문제입니다. 나쁜 의도로 만든 엑셀 파일을 열기만 해도 서버가 꺼질 수 있습니다.
🇺🇸 원문 (English)
Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. Prior to 2.11.0, the checkSheet() function in github.com/xuri/excelize/v2 uses an attacker-controlled <row r="N"> XML attribute value directly as the length argument to make([]xlsxRow, row) without validating it against the Excel row limit (TotalRows = 1,048,576). A specially crafted XLSX file can trigger two denial-of-service variants: (A) an out-of-memory process kill when r=2147483647 forces a ~16 GB allocation attempt, and (B) a runtime panic via out-of-bounds slice indexing when r=-1. Any service that opens attacker-supplied XLSX files and calls GetCellValue is affected. No authentication is required. This issue is fixed in version 2.11.0.
📍 영향받는 시스템
github.com/xuri/excelize/v2 2.11.0 미만 버전
⚔️ 공격 벡터
공격자가 조작된 행 번호(r=2147483647 또는 r=-1)가 포함된 XLSX 파일을 업로드하여 서비스 대상이 파일을 처리하도록 유도
🛡️ 대응 방법
Excelize 라이브러리를 2.11.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전 정보가 2.11.0 미만인지 확인하여 취약 여부를 판단합니다.
go list -m github.com/xuri/excelize/v2