CVE-2026-88047
massStack Buffer Overflow in Tesseract OCR (<= 5.5.3) via Malicious .traineddata Files
CVE-2026-88047 is a stack buffer overflow (CWE-121) in the Classify::ReadNormProtos function of Tesseract OCR's legacy engine, where a whitespace-delimited token from the NORMPROTO component of a .traineddata file is read via std::istream::operator>>(char*) into a fixed 61-byte stack buffer without a stream width limit. Because the 100-byte line buffer can carry tokens of up to 99 characters, a token longer than 60 characters encountered during TessBaseAPI::Init writes up to 39 attacker-controlled bytes past the buffer. An attacker who can supply a malicious .traineddata file to an application that initializes Tesseract's legacy engine can cause stack corruption and denial of service, and potentially control-flow hijacking on affected standard-library implementations. All Tesseract versions 5.5.3 and earlier are affected on typical libstdc++ builds (as commonly used on Linux and Windows), while builds using Apple's libc++ C++20 bounded array overload are incidentally protected. There is no fixed release yet, no public proof-of-concept, and no known in-the-wild exploitation.
What to do: No fixed release exists yet, so monitor the tesseract-ocr GitHub repository and apply the upstream patch promptly when published. Until then, avoid loading .traineddata files from untrusted sources into applications that use Tesseract's legacy engine. Check your build toolchain: typical libstdc++ builds (most Linux/Windows) are affected, while builds using Apple libc++ with the C++20 bounded array overload are incidentally protected.
| tesseract-ocr (open source) Tesseract OCR (legacy engine, libstdc++ builds) | 5.5.3 and earlier; no fixed release available at time of 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, Classify::ReadNormProtos in src/classify/normmatch.cpp parses the NORMPROTO component of a .traineddata file and uses std::istream::operator>>(char*) to extract a whitespace-delimited token into a fixed 61-byte stack buffer without setting a stream width. The 100-byte line buffer can carry a token of up to 99 characters, so a token longer than 60 characters writes up to 39 attacker-controlled bytes past the buffer during TessBaseAPI::Init of the legacy engine, causing stack corruption, denial of service, and potentially control-flow hijacking on affected standard-library implementations. Builds using Apple's libc++ C++20 bounded array overload are incidentally protected, while typical libstdc++ builds remain affected. No fixed release is available as of this review.
- Vendors
- tesseract-ocr
- Products
- tesseract ocr
- Weakness
- CWE-121
- 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.