CVE-2026-88050: Tesseract: Out-of-bounds write in UnicharCompress via unvalidated recoder code values
Tesseract is an open source OCR engine. In version 5.5.3 and earlier, RecodedCharID::DeSerialize in src/ccutil/unicharcompress.h validates length but accepts negative code values from a crafted .traineddata recoder component. UnicharCompress::ComputeCodeRange in src/ccutil/unicharcompress.cpp can consequently produce coderange equal to zero, after which SetupDecoder indexes isvalidstart with the negative code on a size-zero vector. The resulting out-of-bounds bit write uses a large wrapped index and reliably causes a wild-address crash or allocation failure on the default LSTM engine. No fixed release is available as of this review.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Deployments that process attacker-controlled or otherwise untrusted .traineddata files are exposed. The issue occurs with the default LSTM engine.
What does an attacker need to trigger the flaw?
An attacker needs to supply a crafted .traineddata recoder component containing negative recoder code values. Those values pass deserialization validation and later trigger an out-of-bounds bit write during decoder setup.
What is the likely impact of successful exploitation?
The described result is a reliable wild-address crash or allocation failure. The available data does not establish impacts beyond denial of service.
What can be done while no fixed release is available?
Do not accept or process untrusted .traineddata files, and restrict model files to trusted, controlled sources. This is particularly important for workloads using the default LSTM engine.
How can operators determine whether they may be affected?
Tesseract version 5.5.3 and earlier are affected according to the available information. Review whether those deployments load .traineddata files from users, external packages, or other untrusted sources.