# CVE-2026-88051: Tesseract heap out-of-bounds write in GenericVector::read

Source: https://junglewise.ai/threats/cve-2026-88051-tesseract-heap-out-of-bounds-write-in-genericvector-read  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-10. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-88051 · Severity: high · CVSS 7.8 · Published 2026-09-10

Tesseract is an open-source optical character recognition (OCR) engine used to extract text from images and documents. A vulnerability in how it reads trained model files (.traineddata) allows a malicious model to trigger a heap memory corruption that can crash the application or potentially enable arbitrary code execution. Organizations relying on Tesseract to process untrusted or user-supplied training data face service disruption and data security risks.

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-88051 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-88051 being exploited in the wild.

**How severe is CVE-2026-88051?** High severity, with a CVSS score of 7.8, published 10 September 2026.

**Which products and versions are affected?** Tesseract OCR Tesseract 5.5.3 and earlier.

**Is there a fix for CVE-2026-88051?** A patch was published on 2026: Patch commit 56e09ca released in version 5.5.4 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-88051 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-88051?** 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.

## Technical details

The vulnerability is a heap out-of-bounds write in the callback form of GenericVector::read (src/ccutil/genericvector.h). The function reads two independent int32 fields from the model file—reserved (used to allocate memory via reserve()) and size_used_ (used to control the write loop count)—with no validation or invariant check. An attacker can craft a malicious .traineddata file (specifically a TESSDATA_INTTEMP component with version_id ≥ 4) that sets reserved to a small value (e.g., 4) and size_used_ to a large value (e.g., 65536). When fontinfo_table_.read() is called during model initialization in intproto.cpp:850, the code allocates a small buffer via reserve() but writes a much larger number of FontInfo structures past the allocated memory, corrupting the heap. This is a real buffer overflow (not neutralized by NULL-buffer defenses) and can lead to crash or potentially controlled memory corruption. The fix is to cap size_used_ and enforce the invariant size_used_ ≤ reserved before the write loop, as already done in the DeSerialize overloads.

## Affected products

- Tesseract OCR Tesseract 5.5.3 and earlier

## Timeline

- 2026-08-25: disclosed: GitHub security advisory GHSA-88qp-4g94-3rf3 published
- 2026-09-10: advisory: CVE-2026-88051 published on NVD
- 2026: patched: Patch commit 56e09ca released in version 5.5.4

## References

- [https://github.com/tesseract-ocr/tesseract/commit/56e09ca12e751623fe796ce1554ce704bffd2ef0](https://github.com/tesseract-ocr/tesseract/commit/56e09ca12e751623fe796ce1554ce704bffd2ef0)
- [https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-88qp-4g94-3rf3](https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-88qp-4g94-3rf3)

## 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 matrix deserialization integer overflow denial of service](https://junglewise.ai/threats/cve-2026-119340-tesseract-is-an-open-source-ocr-engine-prior-to-5-5-4-generic-2d)
- [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)
