Skip to main content

Tesseract OCR CVE-2026-88051

| EUVDEUVD-2026-75627 HIGH
Out-of-bounds Write (CWE-787)
2026-09-10 GitHub_M
8.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious .traineddata with reserved=small, size_used_=large
  2. Delivery
    Deliver crafted file to Tesseract model directory or upload path
  3. Exploit
    Application initializes Tesseract with malicious model
  4. Execution
    fontinfo_table_.read parses TESSDATA_INTTEMP component
  5. Persist
    Heap OOB write of FontInfo structures past allocated buffer
  6. Impact
    Heap corruption, crash, or code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must control or influence which .traineddata model file Tesseract loads. Concrete delivery paths include: write access to a directory referenced by TESSDATA_PREFIX or the --tessdata-dir argument; an application interface that accepts user-supplied model file paths or uploaded model files; or a man-in-the-middle attack on an unauthenticated model download. The vulnerability fires only during legacy classifier initialization - specifically the TESSDATA_INTTEMP component at version_id ≥ 4 - so Tesseract instances configured with --oem 1 (LSTM-only) bypass the vulnerable path entirely. Exploitation is constrained to scenarios where attacker-controlled model content reaches the Tesseract process; this is not a vulnerability in parsing ordinary document images or text inputs.

Impact

The CVSS 4.0 score of 8.6 with AV:L is appropriate: exploitation requires the attacker to control which .traineddata file Tesseract loads, placing this outside pure network-reachable attack scenarios in default deployments. However, Tesseract is heavily embedded in document-processing pipelines, OCR-as-a-service platforms, and automated ingestion workflows where externally-supplied or user-uploaded model files may be accepted, meaningfully expanding the practical attack surface beyond a simple local-file scenario. The C:H/I:H/A:H impact triad reflects that heap out-of-bounds writes of structured FontInfo objects have historically been leveraged for controlled corruption beyond crash-only outcomes, though no working exploit is currently public. The combination of no fixed release, a confirmed upstream commit, and wide deployment in automated pipelines creates a meaningful patch-gap risk for downstream packagers. EPSS data is absent from the input; exploitation probability cannot be quantitatively estimated. Tesseract in LSTM-only mode (without the legacy classifier) does not load the vulnerable code path, which partially limits exposure in modern deployments.

Exploit ScenarioDerived

An attacker crafts a malicious .traineddata file where the TESSDATA_INTTEMP component encodes reserved=4 and size_used_=65536, then delivers it to a target system - for example, by substituting a model file in an OCR service's model directory, via a supply-chain compromise of a model distribution, or through an application that accepts user-supplied model paths. When the target application initializes Tesseract with this model, fontinfo_table_.read writes 65,536 FontInfo structures into a 4-element heap buffer, corrupting adjacent heap memory. Depending on the heap layout and allocator internals, this results in a process crash or, with attacker-controlled heap grooming, potential code execution within the Tesseract process.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 10, 2026

Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls the loaded .traineddata model file to corrupt heap memory, crash the process, or potentially achieve code execution. The root cause is in GenericVector::read (src/ccutil/genericvector.h): the serialized reserved field allocates the backing buffer while the independent size_used_ field drives the callback write loop, with no invariant check enforcing size_used_ ≤ reserved. A crafted TESSDATA_INTTEMP component with version_id ≥ 4 exploits this by setting reserved small and size_used_ large, triggering the write overrun through fontinfo_table_.read during legacy classifier initialization. No public exploit and no CISA KEV entry exist at time of analysis; an upstream commit fix exists but no patched release has been published.

RemediationAI

No vendor-released patch is available at time of analysis. The upstream fix is available as commit 56e09ca12e751623fe796ce1554ce704bffd2ef0 (https://github.com/tesseract-ocr/tesseract/commit/56e09ca12e751623fe796ce1554ce704bffd2ef0); downstream packagers should backport this single-file patch to src/ccutil/genericvector.h immediately. As a compensating control, restrict Tesseract deployments to loading only trusted, integrity-verified model files from a curated and checksummed source - do not permit user-supplied or externally-downloaded model files without cryptographic verification. Disabling the legacy classifier (--oem 1 for LSTM-only mode) eliminates the vulnerable fontinfo_table_.read path entirely, though it may affect OCR accuracy on use cases relying on the legacy engine. Sandboxing Tesseract worker processes with seccomp, AppArmor, or container filesystem isolation limits blast radius if exploitation occurs; note that disabling filesystem write access does not prevent the heap corruption itself but can contain post-exploitation.

Affected VersionsENISA

tesseract ≤ 5.5.3

Affected Packages

euvd tesseract no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Tesseract's legacy classifier deserializes binary .traineddata model files using the templated GenericVector<T>::read method in src/ccutil/genericvector.h. This method reads two independent int32 fields from the file stream: reserved, which sizes the heap allocation via reserve(), and size_used_, which controls how many elements the callback loop writes. Because no consistency check (size_used_ ≤ reserved) existed prior to the fix, an attacker-controlled model file can diverge these values arbitrarily. The specific trigger path is fontinfo_table_.read(fp, read_info) in src/classify/intproto.cpp, invoked only for TESSDATA_INTTEMP components at version_id 4 or later. CWE-787 (Out-of-bounds Write) applies: the write loop advances past the end of the allocated FontInfo array. The upstream fix (commit 56e09ca) adds a 50,000,000 element cap on reserved, rejects negative values for both fields, and enforces size_used_ ≤ reserved before the loop begins. A new unit test (genericvector_test.cc) validates the reject/accept behavior against crafted payloads including reserved=4/size_used_=65536.

Know when Tesseract gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.6 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

Requires victim application to load attacker-controlled model file (UI:R); no authentication to place or supply the file (PR:N); impact is local to the Tesseract process (S:U).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.8 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Tesseract is an open source OCR engine. In version 5.5.3 and earlier, the callback form of GenericVector::read in src/ccutil/genericvector.h reads the independent int32 fields reserved and size_used_ from a .traineddata model without a cap or an invariant check. reserve(reserved) allocates the backing array, but the callback loop writes size_used_ elements. A crafted TESSDATA_INTTEMP component with version_id 4 or later can therefore set reserved to a small value and size_used_ to a large value when fontinfo_table_.read(fp, read_info) is called from src/classify/intproto.cpp, causing a heap out-of-bounds write of FontInfo structures, heap corruption, a crash, or potentially controlled corruption. No fixed release is available as of this review.

Technical POC Analysis

CWE-787 (out-of-bounds write) in the callback form of GenericVector<T::read in src/ccutil/genericvector.h.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Tesseract OCR versions 5.5.3 and earlier contain a heap memory corruption vulnerability in .traineddata model file parsing that can lead to process crashes or code execution when processing malicious models. No public exploit identified at time of analysis, but organizations using Tesseract for document scanning, form processing, or accessibility features-especially those loading custom or external OCR model files-face elevated risk with no vendor patch currently available.

Business Impact: High
Compensating Controls

Implement cryptographic verification (HMAC or signatures) for all .traineddata files before loading; restrict model files to a read-only whitelist of approved versions; containerize or sandbox Tesseract processes to limit code execution scope; run Tesseract with least-privilege user accounts; monitor and log all model file access and OCR job execution; segment Tesseract services from sensitive systems.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
most widely-used open-source OCR engine, embedded in many document pipelines
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

CVE-2022-38266 MEDIUM POC
6.5 Sep 09

An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial

CVE-2026-88049 HIGH
8.6 Sep 10

Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls a crafted `.traineddata` mod

CVE-2026-88048 HIGH
8.6 Sep 10

Heap out-of-bounds write and read in Tesseract OCR Engine 5.5.3 and earlier allows an attacker who can supply a crafted

CVE-2026-88047 HIGH
8.6 Sep 10

Stack-based buffer overflow in Tesseract OCR 5.5.3 and earlier corrupts the stack during legacy engine initialization, e

CVE-2026-88053 HIGH
8.6 Sep 10

Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who supplies a crafted .traineddata langu

CVE-2026-88052 HIGH
7.8 Sep 10

Heap corruption in Tesseract OCR 5.5.3 and earlier allows an attacker who can supply a malicious unicharset file to corr

CVE-2026-88050 MEDIUM
6.9 Sep 10

Out-of-bounds write in Tesseract OCR engine version 5.5.3 and earlier allows an attacker who can supply a crafted `.trai

CVE-2026-88054 MEDIUM
6.9 Sep 10

Denial of service in Tesseract OCR Engine 5.5.3 and earlier allows a local attacker to crash any process that loads a cr

CVE-2026-119338 MEDIUM
6.9 Oct 30

Double free and use-after-free in the Tesseract OCR PAGE XML renderer (5.4.0 through 5.5.3) leaves the caller-owned righ

CVE-2026-73066 MEDIUM
6.8 Aug 11

Heap out-of-bounds write in Tesseract OCR engine prior to 5.5.3 is triggered by a crafted LSTM .traineddata model file t

CVE-2026-73067 MEDIUM
6.7 Aug 11

Heap out-of-bounds read in Tesseract OCR prior to version 5.5.3 allows an attacker who can supply a crafted .traineddata

CVE-2026-119339 MEDIUM
5.5 Oct 30

Loading a crafted LSTM model into Tesseract OCR 5.5.3 and earlier aborts the host process on the default build configura

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Module for Package Hub 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy