Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted .traineddata file
-
DeliveryTesseract deserializes weight matrix
-
ExploitNegative/overflowing dimensions bypass UINT16_MAX check
-
ExecutionSigned integer overflow in ResizeNoInit
-
ImpactOut-of-bounds access crashes process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target application to load an attacker-controlled .traineddata language model file through Tesseract's GENERIC_2D_ARRAY::DeSerialize(TFile*) path; the crafted file must encode matrix dimensions as negative int32 values (e.g. 0xFFFFFFFF = -1) or as 65535×65535 to bypass the signed 'size > UINT16_MAX' check. The decisive limiting factor is that only the TFile-based deserialization variant is affected (the FILE-based variant already used uint32_t and is safe), and the attacker must be able to deliver a malicious traineddata file - deployments that load only trusted, bundled language data are not practically exploitable. Affected versions are <= 5.5.1 (fixed in 5.5.4); the local vector and required user interaction mean this is not remotely triggerable without someone loading the malicious model. |
| Impact | This is a medium-severity denial-of-service issue, not a priority emergency. The provided CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H, base 5.5) is internally consistent with the mechanism: the local attack vector and required user interaction reflect that an application or user must load an attacker-supplied .traineddata language model, and the impact is availability-only (C:N/I:N) - matching the advisory's confirmed outcome of a crash. No EPSS score was provided and the issue is NOT in CISA KEV, so there is no signal of active or widespread exploitation; exploitation status is 'no public exploit identified at time of analysis' (the references are the GHSA advisory, fixing PR, commit, and release - patch artifacts, not a working exploit). The vuln.today Decision label is 'this_month', consistent with a patchable medium-severity DoS rather than act_now/emergency. One nuance to flag explicitly: the advisory states only 'potential' heap OOB read/write beyond the crash - this is NOT confirmed as achievable code execution, so C:N/I:N remains the honest assessment and the realistic impact is denial of service. The real exposure is narrow: only deployments that load untrusted, user-supplied traineddata files are at risk; applications that ship and load only trusted bundled language data are not practically exploitable. |
| Exploit ScenarioDerived | An application or web service that lets users supply their own Tesseract language model (.traineddata) is given a crafted file whose LSTM weight-matrix dimensions are encoded as -1 (0xFFFFFFFF) or 65535×65535. When Tesseract deserializes the matrix, the malformed dimensions bypass the size check and corrupt allocation state, causing out-of-bounds access and a crash of the OCR process. No public working exploit is identified at time of analysis, though the fixing PR includes a unit test demonstrating the malformed-input trigger. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Loading a crafted .traineddata language model file into Tesseract OCR versions prior to 5.5.4 can crash the process and, in some reuse paths, drive out-of-bounds heap accesses. The flaw lives in GENERIC_2D_ARRAY::DeSerializeSize for the TFile stream variant, which reads matrix dimensions as signed int32_t and compares them against UINT16_MAX with a signed check, so a negative dimension such as 0xFFFFFFFF (-1) or a 65535×65535 pair slips past validation into ResizeNoInit, where the element count overflows. The vector is local (AV:L) with required user interaction (UI:R) and no privileges needed, and the impact is limited to availability (A:H) - someone or something must load the malicious model, so applications that only ever load trusted, bundled language data are not practically exposed. This is a medium-severity denial-of-service issue, not a priority emergency; no public exploit code and no confirmed active exploitation were identified at time of analysis, and version 5.5.4 contains the fix.
RemediationAI
Vendor-released patch: Tesseract OCR 5.5.4 - upgrade to that version, which is shipped at https://github.com/tesseract-ocr/tesseract/releases/tag/5.5.4 and corresponds to the fix in https://github.com/tesseract-ocr/tesseract/pull/4649 (commit 048e92378f1a34dcdaf94bc515c7552ac01f08ef). Distributions and downstream wrappers that vendor Tesseract sources should backport that commit, which reads dimensions as uint32_t, computes the element count in 64 bits, rejects negative or oversized dimensions against a 100000000-element cap, and requires the declared matrix data to fit within the remaining stream bytes. Until the upgrade is deployed, the practical control is to prevent untrusted .traineddata files from reaching the loader - accept only language models from a vetted, internally curated set and reject user-uploaded traineddata rather than invoking Tesseract on them; the trade-off is loss of support for custom or community-trained models, and because the vulnerable state arises during deserialization inside the library, there is no configuration toggle in the affected versions that disables the TFile path while keeping custom-model loading.
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 LSTM engine persists weight matrices through GENERIC_2D_ARRAY<T>, defined in src/ccstruct/matrix.h, and deserializes them from .traineddata files via two overloads. The FILE*-based variant reads dimensions as uint32_t and is safe; the TFile-based variant at lines 591-608 read them as int32_t and then applied if (size1 > UINT16_MAX) return false;, a signed comparison in which -1 > 65535 evaluates false, so negative dimensions reached Resize/ResizeNoInit. Inside ResizeNoInit the allocation size was computed as int new_size = size1 * size2 + pad, a 32-bit multiply that is undefined on overflow: (-1)*(-1) yields 1 while dim1_/dim2_ are stored as -1, and 65535*65535 wraps negative and skips allocation entirely, leaving inconsistent allocation state and later out-of-bounds indexing (a 1 * -1 = -1 index into array_, and IntSimdMatrix access) - a crash, with potential heap OOB read/write when the array is reused. The root cause class is CWE-190 integer overflow (the advisory also tags CWE-681, incorrect conversion between numeric types). The upstream fix in PR #4649 reads both dimensions as uint32_t, computes const int64_t total = static_cast<int64_t>(size1) * size2 + pad and rejects negative dimensions, negative padding, or totals above a new kMaxElements cap of 100000000, changes the pad loop bound to new_size - pad, and adds a sanity check that the declared element data actually fits in fp->RemainingBytes() to stop a tiny file from forcing a huge allocation.
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
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Requires loading a crafted local traineddata file (AV:L, UI:R) with no privileges (PR:N); confirmed impact is a crash only, so C:N/I:N and A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Tesseract is an open source OCR engine. Prior to 5.5.4, GENERIC_2D_ARRAY::DeSerializeSize in src/ccstruct/matrix.h reads matrix dimensions as signed int32_t values and compares them only with UINT16_MAX, allowing negative values to reach ResizeNoInit. Negative dimensions or a 65535 by 65535 product can create inconsistent allocation state and later out-of-bounds accesses while loading a crafted traineddata file, causing denial of service. This issue is fixed in version 5.5.4.
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
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
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 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
EUVD-2026-114451
NVD
CVE.org
EPSS
GitHub
Exploit-DB