CVE-2026-88048
massHeap out-of-bounds write/read in Tesseract OCR via crafted .traineddata model files
Tesseract OCR 5.5.3 and earlier contains a heap out-of-bounds write and read in FullyConnected::DeSerialize (src/lstm/fullyconnected.cpp), which fails to validate the ni_ and no_ layer scalars read from a .traineddata file against the dimensions of the stored weight matrix. When a crafted NT_SOFTMAX layer is loaded and run through the default LSTM engine, MatrixDotVector (src/lstm/weightmatrix.cpp) writes w.dim1() results into a buffer sized from no_ and reads w.dim2()-1 inputs from a buffer sized from ni_, so inconsistent dimensions corrupt adjacent heap memory. An attacker who can get a malicious .traineddata file loaded — for example a user or automated pipeline ingesting model files from an untrusted source — gains heap corruption and a crash (denial of service), and potentially information disclosure or controlled corruption. Any deployment of Tesseract 5.5.3 or earlier is affected, including the many applications, wrappers, and document-processing pipelines that embed the engine. No public proof-of-concept, CISA KEV listing, or known in-the-wild exploitation has been reported, and no fixed release was available at the time of this review.
What to do: Until a patched release is published, only load .traineddata model files from trusted sources (distribution packages or official tessdata repositories) and avoid processing user-supplied model files through Tesseract. Monitor the Tesseract GitHub repository and upgrade to the first release containing the fix as soon as it becomes available. Packagers and vendors embedding the engine should plan to rebuild against the patched version once it ships.
| Tesseract OCR project (open source) Tesseract OCR | All versions through 5.5.3 (no fixed release available as of this review) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Vendors
- tesseract-ocr
- Products
- tesseract ocr
- Weakness
- CWE-125, CWE-787
- Vector
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.