Tesseract: GENERIC_2D_ARRAY DeSerializeSize signed integer comparison bypass allows negative dimensions
Affects Tesseract up to and including 5.5.1 when it loads a crafted .traineddata language model file. Fixed in 5.5.4.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Fix
- Fixed in 5.5.4
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
Tesseract, an open source OCR (optical character recognition) engine, is affected when it loads a specially crafted traineddata file. Successfully exploiting this flaw could cause the program to crash or hang, resulting in a denial of service.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Tesseract is an open source OCR engine. Prior to 5.5.4, GENERIC_2D_ARRAY::DeSerializeSize in src/ccstruct/matrix.h reads matrix dimensions as signed int32_t values and compares them only with UINT16_MAX, allowing negative values to reach ResizeNoInit. Negative dimensions or a 65535 by 65535 product can create inconsistent allocation state and later out-of-bounds accesses while loading a crafted traineddata file, causing denial of service. This issue is fixed in version 5.5.4.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- tesseract-ocr tesseract
fixed in 5.5.4
References 4
GitHub · tesseract-ocr/tesseract
Questions about CVE-2026-119340
What does this mean?
A crafted .traineddata language model file can make Tesseract crash when it loads the file, which is a denial of service. The advisory also notes a potential heap out-of-bounds read or write when 2D arrays are reused with overflowed dimensions.Source: github.com
Am I affected, and how do I check?
Tesseract versions up to and including 5.5.1 are affected, when they load a .traineddata file through GENERIC_2D_ARRAY::DeSerialize. To check the installed version, run tesseract --version.Source: github.com
What should I do about it?
Upgrade Tesseract to 5.5.4 or later, which contains the fix.Source: github.com
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data