🇰🇷 한글 설명
오픈소스 OCR 엔진인 Tesseract 5.5.3 및 이전 버전에서 발생하는 취약점입니다. 조작된 .traineddata 파일의 특정 값을 검증 없이 루프 범위로 사용하여, 초기화 과정 중 힙 영역에 경계를 벗어난 포인터 쓰기가 발생할 수 있습니다. 이로 인해 힙 손상, 프로그램 충돌 또는 공격자에 의한 임의 코드 실행이 가능할 수 있습니다.
💡 쉬운 설명
Tesseract 프로그램이 잘못 만들어진 데이터 파일을 읽을 때, 메모리의 정해진 범위를 넘어서 데이터를 쓰는 오류가 발생합니다. 이 오류를 이용하면 프로그램이 멈추거나 해커가 컴퓨터를 제어할 위험이 있습니다.
🇺🇸 원문 (English)
Tesseract is an open source OCR engine. In version 5.5.3 and earlier, Classify::ReadIntTemplates in src/classify/intproto.cpp reads NumClassPruners, NumClasses, and NumProtoSets from the TESSDATA_INTTEMP component of a crafted .traineddata file and uses those values as loop bounds without validating them against MAX_NUM_CLASS_PRUNERS, MAX_NUM_CLASSES, and MAX_NUM_PROTO_SETS. The loops store heap pointers into fixed-capacity ClassPruners and ProtoSets arrays in INT_TEMPLATES_STRUCT and INT_CLASS_STRUCT, so an oversized count causes heap out-of-bounds pointer writes during legacy-classifier initialization before OCR begins, resulting in 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
⚔️ 공격 벡터
조작된 .traineddata 파일을 Tesseract 엔진에 입력하여 힙 메모리 오버플로우 유도
🛡️ 대응 방법
Tesseract 보안 패치가 포함된 최신 버전으로 업데이트 (현재 기준 고정된 릴리스 없음)
🔧 검증 코드
명령어 결과에 5.5.3 이하의 버전 번호가 출력되면 해당 취약점에 노출된 상태입니다.
tesseract --version 2>/dev/null | grep -E '5\[0-5]\.'