Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlace or substitute crafted .traineddata in tessdata path
-
DeliveryTesseract initializes legacy classifier via ReadIntTemplates
-
ExploitFile-sourced NumClassPruners/NumClasses/NumProtoSets bypass all bounds checks
-
ExecutionLoop writes heap pointers past end of fixed-capacity ClassPruners[]/ProtoSets[] arrays
-
ImpactHeap corruption achieves crash or controlled 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 | Exploitation requires that the attacker can supply or substitute a .traineddata language model file consumed by the target Tesseract instance - for example, by writing to the tessdata directory, manipulating the TESSDATA_PREFIX environment variable, or controlling any application-level parameter that selects the language data path. The corruption fires during legacy-classifier initialization before OCR processing begins, meaning every Tesseract invocation referencing the malicious file is a trigger event. Exploitation is constrained to standard builds; instances compiled with DISABLED_LEGACY_ENGINE are not affected. Reliable code execution from the heap OOB pointer write is additionally limited by heap layout variability - a crash is the baseline outcome, controlled execution requires heap-shaping effort. |
| Impact | The CVSS 4.0 score of 8.6 with AV:L reflects that an attacker must control a .traineddata file consumed by the target - a prerequisite that substantially limits opportunistic exploitation. The impact metrics VC:H/VI:H/VA:H capture worst-case heap corruption through code execution, though achieving reliable RCE from a heap pointer OOB write requires non-trivial heap layout manipulation and is implementation-dependent. No EPSS data is present in the provided intelligence and this CVE is not listed in CISA KEV, so no confirmed active exploitation exists. The absence of a public exploit further reduces immediate automated exploitation risk. Real-world risk is most elevated in automated document-processing pipelines that ingest .traineddata files from untrusted sources - environments such as document conversion services or ML preprocessing pipelines. Organizations that control their own tessdata directories face meaningfully lower risk. The DISABLED_LEGACY_ENGINE compile-time flag provides a hard mitigation where legacy classifier functionality is not required. |
| Exploit ScenarioDerived | An attacker crafts a .traineddata file containing a TESSDATA_INTTEMP component with NumClassPruners set far above MAX_NUM_CLASS_PRUNERS, then delivers it to a document processing service that passes user-supplied language model paths to Tesseract. On the next OCR invocation, ReadIntTemplates loops past the end of the fixed ClassPruners[] heap array, writing attacker-influenced pointers into adjacent allocations; depending on heap layout, this can yield a crash for denial of service or, with heap grooming, controlled overwrites enabling code execution in the Tesseract process. No public proof-of-concept exploit has been identified at time of analysis. |
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 supplies a crafted .traineddata language file to corrupt heap memory during legacy OCR classifier initialization, with potential for controlled code execution. The flaw is in ReadIntTemplates in src/classify/intproto.cpp, which reads NumClassPruners, NumClasses, and NumProtoSets from the TESSDATA_INTTEMP file component and uses them directly as loop bounds - storing heap pointers into fixed-capacity struct arrays without validating against compile-time maximums. No patched release exists as of this review, though a fix commit is present in the repository; no public exploit has been identified.
RemediationAI
No vendor-released patched version is available as of this analysis; the fix exists only as untagged commit 8b0574680f3b22f246ade6a4c8e3029104255c63 at https://github.com/tesseract-ocr/tesseract/commit/8b0574680f3b22f246ade6a4c8e3029104255c63. Organizations that can tolerate building from source should apply this commit directly. As a hard compensating control, recompiling Tesseract with the DISABLED_LEGACY_ENGINE flag removes the vulnerable code path entirely at the cost of legacy classifier functionality - evaluate whether downstream OCR workflows depend on the legacy engine before applying this. Where recompilation is not feasible, restrict the tessdata directory to read-only access by the application user and populate it only from integrity-verified official language model files; never allow the TESSDATA_PREFIX environment variable or equivalent configuration to point to user-supplied paths. Automated pipelines that accept user-uploaded .traineddata files should be treated as the highest-risk deployment class and sandboxed immediately.
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 OCR classifier loads binary .traineddata language model files composed of named components, including TESSDATA_INTTEMP, which stores integer template data for character classification. ReadIntTemplates in src/classify/intproto.cpp reads three file-supplied counts - NumClassPruners, NumClasses, and NumProtoSets - and uses them as loop bounds that write heap-allocated pointers into ClassPruners[] and ProtoSets[], which are fixed-capacity arrays embedded in INT_TEMPLATES_STRUCT and INT_CLASS_STRUCT. CWE-787 (Out-of-bounds Write) applies precisely: these arrays have compile-time maximum sizes (MAX_NUM_CLASS_PRUNERS, MAX_NUM_CLASSES, MAX_NUM_PROTO_SETS), but the pre-fix code never validates file-sourced counts against those constants, so an oversized value drives writes past the array end and into adjacent heap data. The same pattern was also present in ReadAdaptedClass for NumTempProtos and NumConfigs, as evidenced by the fix commit. CPE cpe:2.3:a:tesseract-ocr:tesseract:*:*:*:*:*:*:*:* confirms all versions through 5.5.3 are in scope. Builds compiled with DISABLED_LEGACY_ENGINE omit the vulnerable code path entirely.
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
Local attack via controlled .traineddata file path; no privileges or user interaction required in automated pipeline scenarios; full heap corruption impact including potential code execution.
AV:L/AC:L/PR:N/UI:N/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, Classify::ReadIntTemplates in src/classify/intproto.cpp reads NumClassPruners, NumClasses, and NumProtoSets from the TESSDATA_INTTEMP component of a crafted .traineddata file and uses those values as loop bounds without validating them against MAX_NUM_CLASS_PRUNERS, MAX_NUM_CLASSES, and MAX_NUM_PROTO_SETS. The loops store heap pointers into fixed-capacity ClassPruners and ProtoSets arrays in INT_TEMPLATES_STRUCT and INT_CLASS_STRUCT, so an oversized count causes heap out-of-bounds pointer writes during legacy-classifier initialization before OCR begins, resulting in 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).
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 that could enable code execution when processing malicious language data files, with no public exploit identified at time of analysis. Organizations using Tesseract for document scanning, text extraction, and data processing face potential system compromise if their OCR systems process untrusted language files. No vendor-released patch is currently available.
No vendor-released patch identified at time of analysis. Restrict language data files to official Tesseract distributions and validate file integrity via cryptographic checksums before deployment; disable or sandbox OCR processing for documents accompanied by external language files; implement strict file-level access controls and audit logging on traineddata file directories; monitor application logs for malformed traineddata processing errors as a potential attack indicator; and consider disabling legacy OCR classifier modes if not required for business operations.
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 controls the loaded .traineddata mode
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-75630
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB