🇰🇷 한글 설명
Tesseract OCR 엔진 5.5.3 및 이전 버전에서 unicharset.cpp 파일 내의 UNICHARSET::load_via_fgets 함수에 취약점이 존재합니다. 입력된 유니코드 개수를 신뢰하여 루프 경계로 사용하고 인덱스 검증 없이 벡터에 접근함으로써, 힙 메모리 손상, 크래시 또는 제어 가능한 메모리 오염을 유발할 수 있습니다.
💡 쉬운 설명
Tesseract라는 글자 인식 프로그램이 잘못된 데이터를 읽을 때 메모리 관리 오류를 일으키는 문제입니다. 이로 인해 프로그램이 갑자기 꺼지거나 해커가 시스템을 조작할 위험이 있습니다.
🇺🇸 원문 (English)
Tesseract is an open source OCR engine. In version 5.5.3 and earlier, UNICHARSET::load_via_fgets in src/ccutil/unicharset.cpp trusts the declared unichar count as a loop bound and uses id as an unchecked index into the unichars vector. unichar_insert_backwards_compatible can leave the vector unchanged for an empty, duplicate, or already-encodable representation, causing id to become larger than unichars.size(). Subsequent set_* calls and the write to unichars[id].properties.enabled then write UNICHAR_PROPERTIES beyond the vector during initialization in both the default LSTM and legacy engines, causing heap corruption, a crash, or potentially controlled corruption. No fixed release is available as of this review.
📍 영향받는 시스템
Tesseract OCR version 5.5.3 and earlier
⚔️ 공격 벡터
조작된 유니코드 데이터가 포함된 파일을 Tesseract 엔진으로 처리할 때 발생
🛡️ 대응 방법
현재 수정 버전이 없으므로 신뢰할 수 없는 입력 데이터에 대한 검증을 강화하거나 패치 출시를 대기해야 함
🔧 검증 코드
출력된 버전이 5.5.3 이하인 경우 해당 취약점에 노출된 상태입니다.
tesseract --version 2>/dev/null | grep -E 'tesseract 5\[\.\d+\.\d+\]'