CVE-2026-88049: Tesseract: Heap out-of-bounds write in LSTM::Forward via na_/gate-matrix dimension mismatch

Published Sep 10, 2026
·
Updated

Tesseract is an open source OCR engine. In version 5.5.3 and earlier, prior .traineddata hardening added bounds checks to NetworkIO::CopyTimeStepGeneral and NetworkIO::Randomize in src/lstm/networkio.cpp but left NetworkIO::WriteTimeStepPart and NetworkIO::AddTimeStepPart unchecked. In LSTM::Forward in src/lstm/lstm.cpp, source is sized from the independently deserialized na field while the WriteTimeStepPart count is ns, which comes from the CI gate WeightMatrix dim1() value. A crafted NTLSTM layer can make ns much larger than na, causing a heap out-of-bounds write during the first recognition step on the default LSTM engine and resulting in heap corruption, a crash, or potentially controlled corruption. No fixed release is available as of this review.

Affected Software

1 affected component
Tesseract OCR engine<=5.5.3

Event History

Sep 10, 2026
CVE Published
via MITRE·04:23 PM
Data Sourced
via MITRE·04:23 PM
DescriptionWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Users of Tesseract 5.5.3 and earlier are exposed when they run recognition with a crafted NT_LSTM .traineddata layer. The affected path is the default LSTM engine, and the out-of-bounds write occurs during the first recognition step.

2

What does an attacker need to exploit it?

An attacker needs to supply or cause use of a malicious .traineddata file containing an NT_LSTM layer whose independently deserialized na_ value is smaller than the CI gate WeightMatrix dim1()-derived ns_ value. This dimension mismatch causes the write count to exceed the size of source_.

3

Are the earlier .traineddata bounds-checking changes sufficient protection?

No. Bounds checks were added to NetworkIO::CopyTimeStepGeneral and NetworkIO::Randomize, but NetworkIO::WriteTimeStepPart and NetworkIO::AddTimeStepPart remained unchecked, leaving this write path vulnerable.

4

Is a fixed release available?

No fixed release was available as of the review. The referenced commit provides relevant remediation information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203