Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious .traineddata with reserved=small, size_used_=large
-
DeliveryDeliver crafted file to Tesseract model directory or upload path
-
ExploitApplication initializes Tesseract with malicious model
-
Executionfontinfo_table_.read parses TESSDATA_INTTEMP component
-
PersistHeap OOB write of FontInfo structures past allocated buffer
-
ImpactHeap 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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).
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls a crafted `.traineddata` mod
Heap out-of-bounds write and read in Tesseract OCR Engine 5.5.3 and earlier allows an attacker who can supply a crafted
Stack-based buffer overflow in Tesseract OCR 5.5.3 and earlier corrupts the stack during legacy engine initialization, e
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who supplies a crafted .traineddata langu
Heap corruption in Tesseract OCR 5.5.3 and earlier allows an attacker who can supply a malicious unicharset file to corr
Out-of-bounds write in Tesseract OCR engine version 5.5.3 and earlier allows an attacker who can supply a crafted `.trai
Denial of service in Tesseract OCR Engine 5.5.3 and earlier allows a local attacker to crash any process that loads a cr
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
Heap out-of-bounds write in Tesseract OCR engine prior to 5.5.3 is triggered by a crafted LSTM .traineddata model file t
Heap out-of-bounds read in Tesseract OCR prior to version 5.5.3 allows an attacker who can supply a crafted .traineddata
Loading a crafted LSTM model into Tesseract OCR 5.5.3 and earlier aborts the host process on the default build configura
Same weakness CWE-787 – Out-of-bounds Write
View allSame technique Buffer Overflow
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
EUVD-2026-75627
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB