Skip to main content
← All vulnerabilities
CVE-2026-119340

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.

Published
Last modified
published
Not listed in CISA KEV
Specific setups only
Fix
Fixed in 5.5.4
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

  1. CVE published
  2. First seen by cve.now

Affected versions

  • tesseract-ocr tesseract

    fixed in 5.5.4

References 4

GitHub · tesseract-ocr/tesseract

FAQ

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