Skip to main content

Tesseract OCR EUVDEUVD-2026-114451

| CVE-2026-119340 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-10-30 GitHub_M
5.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted .traineddata file
  2. Delivery
    Tesseract deserializes weight matrix
  3. Exploit
    Negative/overflowing dimensions bypass UINT16_MAX check
  4. Execution
    Signed integer overflow in ResizeNoInit
  5. Impact
    Out-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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.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 – 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

tesseract < 5.5.4

Affected Packages

euvd tesseract fix: 5.5.4

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

Vendor (GitHub_M) PRIMARY 5.5 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
vuln.today AI 5.5 MEDIUM

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Oct 30, 2026 - 22:03 EUVD
CVE Published
Oct 30, 2026 - 20:22 cve.org
MEDIUM 5.5

DescriptionCVE.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

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
Tesseract is a very widely deployed open-source OCR engine and library
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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

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.

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-88051 HIGH
8.6 Sep 10

Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls the loaded .traineddata mode

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

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