🇰🇷 한글 설명
Tesseract OCR 엔진 5.5.3 및 이전 버전에서 발생하는 취약점으로, 역직렬화 과정 중 레이어 스칼라 값을 검증하지 않아 발생합니다. 조작된 .traineddata 파일을 사용할 경우 힙 영역의 경계를 벗어난 읽기 및 쓰기가 발생하여 메모리 손상, 크래시 또는 정보 유출이 발생할 수 있습니다.
💡 쉬운 설명
Tesseract라는 글자 인식 프로그램이 잘못 만들어진 학습 데이터를 읽을 때 메모리 오류를 일으키는 문제입니다. 이를 통해 해커가 프로그램의 정보를 훔치거나 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (English)
Tesseract is an open source OCR engine. In version 5.5.3 and earlier, FullyConnected::DeSerialize in src/lstm/fullyconnected.cpp does not validate the deserialized layer scalars ni_ and no_ against the weight-matrix dimensions. During FullyConnected::Forward, MatrixDotVector in src/lstm/weightmatrix.cpp writes w.dim1() results into temp_line, which is sized from no_, and reads w.dim2() minus one inputs from curr_input, which is sized from ni_. A crafted .traineddata NT_SOFTMAX layer can therefore use inconsistent dimensions to cause a heap out-of-bounds write and read on the default LSTM engine, resulting in heap corruption, a crash, information disclosure, or potentially controlled corruption. No fixed release is available as of this review.
📍 영향받는 시스템
Tesseract OCR version 5.5.3 and earlier
⚔️ 공격 벡터
조작된 .traineddata 파일을 Tesseract 엔진으로 로드하여 공격
🛡️ 대응 방법
현재 수정 버전이 없으므로 신뢰할 수 없는 출처의 .traineddata 파일 사용을 금지하고 패치 출시를 대기해야 함
🔧 검증 코드
명령어 결과에 5.5.3 이하의 버전 번호가 출력되면 해당 취약점에 노출된 상태입니다.
tesseract --version 2>/dev/null | grep -E '5\[0-5]\.[0-5]\.[0-5]'