# CVE-2026-119340: Tesseract matrix deserialization integer overflow denial of service

Source: https://junglewise.ai/threats/cve-2026-119340-tesseract-is-an-open-source-ocr-engine-prior-to-5-5-4-generic-2d  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-30. Updated: 2026-10-30  
License: CC BY 4.0 with a link back

CVE-2026-119340 · Severity: medium · CVSS 5.5 · Published 2026-10-30

Tesseract is an open-source optical character recognition (OCR) engine used to extract text from images and documents. A flaw in how it reads matrix dimensions from traineddata files allows an attacker to supply a crafted file that triggers memory allocation failures or out-of-bounds memory access, causing the application to crash and preventing legitimate OCR operations.

Technologies: [Tesseract OCR Tesseract](https://junglewise.ai/threats/technologies/tesseract). Vendors: [Tesseract OCR](https://junglewise.ai/threats/vendors/tesseract-ocr).

## Quick answers

**Is CVE-2026-119340 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-119340 being exploited in the wild.

**How severe is CVE-2026-119340?** Medium severity, with a CVSS score of 5.5, published 30 October 2026.

**Which products and versions are affected?** Tesseract OCR Tesseract prior to 5.5.4.

**Is there a fix for CVE-2026-119340?** Yes: fixed in 5.5.4. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-119340 attacked?** It is attacked with local access.

**Am I affected by CVE-2026-119340?** Check whether you run Tesseract OCR Tesseract at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 5.5.4

## Technical details

GENERIC_2D_ARRAY::DeSerializeSize in matrix.h reads matrix dimensions as signed int32_t and validates only against UINT16_MAX, allowing negative values to pass validation and reach ResizeNoInit. Negative dimensions or large products cause signed integer overflow and out-of-bounds accesses in IntSimdMatrix when parsing a malicious traineddata file. The vulnerability is triggered by loading a crafted traineddata file and requires no authentication or network access beyond file delivery.

## Affected products

- Tesseract OCR Tesseract prior to 5.5.4

## Timeline

- 2026-10-30: disclosed
- 2026-10-18: patched

## References

- [https://github.com/tesseract-ocr/tesseract/commit/048e92378f1a34dcdaf94bc515c7552ac01f08ef](https://github.com/tesseract-ocr/tesseract/commit/048e92378f1a34dcdaf94bc515c7552ac01f08ef)
- [https://github.com/tesseract-ocr/tesseract/pull/4649](https://github.com/tesseract-ocr/tesseract/pull/4649)

## Related threats

- [Tesseract unsafe pointer deserialization in adaptive templates](https://junglewise.ai/threats/cve-2026-119341-tesseract-is-an-open-source-ocr-engine-prior-to-5-5-4)
- [Tesseract empty network stack denial of service in model deserialization](https://junglewise.ai/threats/cve-2026-88054-tesseract-empty-network-stack-denial-of-service-in-model)
- [Tesseract OCR heap out-of-bounds write in inttemp deserialization](https://junglewise.ai/threats/cve-2026-88053-tesseract-ocr-heap-out-of-bounds-write-in-inttemp-deserialization)
- [Tesseract heap out-of-bounds write in UNICHARSET loading](https://junglewise.ai/threats/cve-2026-88052-tesseract-heap-out-of-bounds-write-in-unicharset-loading)
- [Tesseract heap out-of-bounds write in GenericVector::read](https://junglewise.ai/threats/cve-2026-88051-tesseract-heap-out-of-bounds-write-in-genericvector-read)
