CVE-2026-88047: CWE-121: Stack-based Buffer Overflow in tesseract-ocr tesseract
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.
AI Analysis
Technical Summary
Tesseract OCR versions 5.5.3 and earlier contain a stack-based buffer overflow in the Classify::ReadNormProtos function located in src/classify/normmatch.cpp. The function reads a whitespace-delimited token from a .traineddata file into a fixed 61-byte stack buffer using std::istream::operator>>(char*) without limiting the input size. Since the input line buffer can hold up to 99 characters, tokens longer than 60 characters cause up to 39 bytes of overflow past the buffer during TessBaseAPI::Init of the legacy engine. This overflow can cause stack corruption, denial of service, and potentially allow control-flow hijacking on standard-library implementations like libstdc++. Builds using Apple's libc++ C++20 bounded array overload are not affected. No patch or fixed release is available as of the current review.
Potential Impact
Exploitation of this vulnerability can lead to stack corruption, which may cause denial of service or potentially allow an attacker to hijack control flow. The vulnerability requires local access to supply a crafted .traineddata file and is exploitable during the initialization of the legacy engine. The impact is rated high with a CVSS 4.0 score of 8.6, reflecting high complexity and potential for significant damage if exploited.
Mitigation Recommendations
No official fix or patch is currently available for this vulnerability. Users should monitor the vendor's advisory channels for updates. Builds using Apple's libc++ C++20 bounded array overload are incidentally protected. Until a fix is released, avoid using untrusted .traineddata files with affected versions of Tesseract OCR.
CVE-2026-88047: CWE-121: Stack-based Buffer Overflow in tesseract-ocr tesseract
Description
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.
CVSS v4.0
Score 8.6high
Affected software
pkg:github/tesseract-ocr/tesseractRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Tesseract OCR versions 5.5.3 and earlier contain a stack-based buffer overflow in the Classify::ReadNormProtos function located in src/classify/normmatch.cpp. The function reads a whitespace-delimited token from a .traineddata file into a fixed 61-byte stack buffer using std::istream::operator>>(char*) without limiting the input size. Since the input line buffer can hold up to 99 characters, tokens longer than 60 characters cause up to 39 bytes of overflow past the buffer during TessBaseAPI::Init of the legacy engine. This overflow can cause stack corruption, denial of service, and potentially allow control-flow hijacking on standard-library implementations like libstdc++. Builds using Apple's libc++ C++20 bounded array overload are not affected. No patch or fixed release is available as of the current review.
Potential Impact
Exploitation of this vulnerability can lead to stack corruption, which may cause denial of service or potentially allow an attacker to hijack control flow. The vulnerability requires local access to supply a crafted .traineddata file and is exploitable during the initialization of the legacy engine. The impact is rated high with a CVSS 4.0 score of 8.6, reflecting high complexity and potential for significant damage if exploited.
Mitigation Recommendations
No official fix or patch is currently available for this vulnerability. Users should monitor the vendor's advisory channels for updates. Builds using Apple's libc++ C++20 bounded array overload are incidentally protected. Until a fix is released, avoid using untrusted .traineddata files with affected versions of Tesseract OCR.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-09-09T21:22:45.433Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aa2dccdf76d26f025573a8b
Added to database: 09/10/2026, 16:37:33 UTC
Last enriched: 09/10/2026, 16:51:14 UTC
Last updated: 09/10/2026, 17:26:36 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.