Skip to main content

Tesseract OCR CVE-2026-119339

| EUVDEUVD-2026-114447 MEDIUM
Improper Input Validation (CWE-20)
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
    Deliver crafted .traineddata/LSTM model to target
  2. Delivery
    Application calls TessBaseAPI::Init to load model
  3. Exploit
    DeSerialize reads mode byte with kDoubleFlag clear
  4. Execution
    Dispatch to unimplemented DeSerializeOld
  5. Impact
    ASSERT_HOST aborts process (DoS)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

The host application must load an attacker-controlled model: a crafted .traineddata file (or an LSTM blob fed as the TESSDATA_LSTM component) whose first WeightMatrix mode byte has bit 7 (kDoubleFlag, 0x80) clear, e.g. 0x00, passed through TessBaseAPI::Init / init_tesseract_lang_data on a build with FAST_FLOAT enabled. FAST_FLOAT is on by default in both CMakeLists.txt and configure.ac, so this is the standard build path, not a non-default configuration. The principal limiting factors are that exploitation requires the application to actually load an untrusted or externally-supplied model (user/application interaction, local vector) and that impact is limited to process termination (denial of service) with no code execution or data disclosure; deployments that only load trusted first-party models are not realistically exposed.

Impact

This is a moderate, correctly-rated issue rather than an urgent priority. The 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: exploitation requires a local vector because the attacker must get a crafted model file loaded (AV:L), needs no authentication to the Tesseract API (PR:N), but does depend on the application loading an attacker-supplied model (UI:R), and the only impact is availability (A:H) - no confidentiality or integrity loss (C:N/I:N). The vuln.today decision label is 'this_month', not act_now/emergency, which aligns with a reachable-assertion DoS. No EPSS score and no KEV status are present in the input, so there is no signal of active or widespread exploitation; absence of these is not itself evidence either way. A credible proof of concept exists (AFL fuzzing found it, the advisory gives a minimal reproduction recipe, and a regression test ships with the fix), so the flaw is demonstrably triggerable, but a PoC is not the same as active exploitation and none is claimed. The real-world risk is confined to services that load untrusted or externally-sourced .traineddata/LSTM models; a long-running host application embedding Tesseract would be aborted (observed as SIGILL) by a single bad input. For deployments that only ever load trusted, first-party models, practical risk is low.

Exploit ScenarioDerived

A service that embeds Tesseract and accepts user-supplied OCR language/model data (or pulls models from an untrusted source) is handed a crafted .traineddata file whose embedded WeightMatrix mode byte has bit 7 (kDoubleFlag) clear. When the application calls TessBaseAPI::Init to load it, DeSerialize dispatches to the unimplemented DeSerializeOld path, which hits ASSERT_HOST and aborts the whole process. A public PoC reference and reproduction recipe exist, and the attack is reliable (not timing-dependent), though it requires the victim application to load the attacker's model (local vector, user/app interaction).

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% 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 LSTM model into Tesseract OCR 5.5.3 and earlier aborts the host process on the default build configuration, giving denial of service against any application that calls TessBaseAPI::Init on untrusted .traineddata data. The flaw sits in WeightMatrix::DeSerialize, which trusts a single attacker-controlled mode byte and routes to a legacy parser that is unimplemented under FAST_FLOAT and calls ASSERT_HOST instead of returning an error; since FAST_FLOAT is enabled by default in both CMakeLists.txt and configure.ac, ordinary builds are affected. Impact is limited to process termination (no code execution or data disclosure) and requires the target to actually load an attacker-supplied model, so this is a moderate, correctly-rated issue rather than an urgent priority; a public PoC reference exists (the crafted mode-byte blob and reproduction recipe documented in the upstream advisory), though it is not verified as working exploit code, and no active exploitation has been reported.

RemediationAI

Upgrade to Tesseract OCR 5.5.4, which contains the upstream fix (pull request 4657, commit c053424327352b9d5180aa7540c1f9e67c64f27e, release https://github.com/tesseract-ocr/tesseract/releases/tag/5.5.4); the patch replaces the ASSERT_HOST abort in WeightMatrix::DeSerializeOld with an error message and a false return so a malformed model simply fails to load, and it ships a regression test (unittest/weightmatrix_deserialize_test.cc) that checks old-format mode bytes 0, 1, 4 and 5 are rejected. Until patched, the most direct workaround is to avoid feeding untrusted models to TessBaseAPI::Init: accept only first-party .traineddata files from a controlled directory and never let users supply a model path or in-memory model buffer, at the cost of losing any feature that relied on user-uploaded models. Rebuilding with FAST_FLOAT disabled also removes the abort path because the legacy parser is implemented in that configuration, but it changes LSTM arithmetic from float to double, affects memory use and performance, and leaves other malformed-model failure paths to be audited. Where model inputs cannot be trusted, run OCR in a separate, restartable worker process or sandbox so an abort terminates only the worker; this contains the denial of service but adds IPC and supervision overhead and does not fix the underlying defect. Details and fixed-version confirmation are in the advisory at https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-h9g4-frjx-6cj3.

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 stores LSTM network weights in a WeightMatrix serialization format whose first byte is a mode flag: bit 7 (kDoubleFlag, 0x80) signals the current double-format layout, and any value with that bit clear selects the legacy float-format parser WeightMatrix::DeSerializeOld. Under FAST_FLOAT builds the legacy parser is a stub that executes ASSERT_HOST("not implemented"), which routes through ERRCODE::error with ABORT and terminates the process (SIGILL on Linux, __builtin_trap in debug builds), making the following 'return false' unreachable. The tainted byte travels unvalidated: TessBaseAPI::Init / init_tesseract_lang_data open the traineddata file, TessdataManager::Init wraps raw file bytes in a TFile and validates only the top-level entry table, LSTMRecognizer::Load fetches the TESSDATA_LSTM component pointer, Network::CreateFromFile instantiates FullyConnected/LSTM/Convolve/Series/Parallel layers recursively, and leaf-layer DeSerialize hands the stream to WeightMatrix::DeSerialize, where TFile::DeSerialize is a bare FReadEndian with no semantic checks. The root cause is CWE-20 (improper validation of the mode byte from an untrusted model) surfacing as CWE-617 (reachable assertion). The assessed vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H matches this: the attacker must get a malicious model loaded (user interaction, local vector), no privileges are needed, and only availability is lost. The trigger is precisely described in the sources - a mode byte with bit 7 clear, such as 0x00, 0x01, 0x04 or 0x05.

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

Attacker needs no auth to the API (PR:N) but must get a crafted model loaded (AV:L, UI:R); trigger is deterministic (AC:L) and impact is process abort only (A:H, C:N/I:N).

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:P/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:13 cve.org
MEDIUM 5.5

DescriptionCVE.org

Tesseract is an open source OCR engine. Prior to 5.5.4, WeightMatrix::DeSerialize trusts a mode byte from a traineddata LSTM network and calls WeightMatrix::DeSerializeOld when kDoubleFlag is clear. In default FAST_FLOAT builds, DeSerializeOld invokes ASSERT_HOST instead of returning an error, so loading a crafted model through TessBaseAPI::Init terminates the process and causes denial of service. This issue is fixed in version 5.5.4.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
High
very widely used open-source OCR engine embedded in many applications
Data Quality
6 sources
Confidence: High

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.2%
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
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

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

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