Skip to main content

Tesseract OCR CVE-2026-88049

| EUVDEUVD-2026-75592 HIGH
Out-of-bounds Write (CWE-787)
2026-09-10 GitHub_M
8.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft .traineddata with oversized CI gate dim1 (ns_ >> na_)
  2. Delivery
    Deliver crafted file to Tesseract model-loading path
  3. Exploit
    LSTM::DeSerialize loads inconsistent na_/ns_ without cross-validation
  4. Execution
    LSTM::Forward allocates source_ buffer sized by na_
  5. Persist
    WriteTimeStepPart writes ns_ floats past buffer end
  6. Impact
    Heap corruption causes crash or controlled 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

Exploitation requires the attacker to supply or substitute a crafted .traineddata file that is subsequently loaded by Tesseract for text recognition. The crafted file must contain an NT_LSTM (or NT_LSTM_SUMMARY) layer with gate matrix dimensions (specifically CI gate dim1 = ns_) inconsistent with the na_ field. The vulnerability is triggered on the very first recognition step using the default LSTM engine - no additional configuration beyond normal Tesseract invocation is required. Exploitation is limited by file-delivery access: applications that load only trusted, internally-managed model files from a protected path are not exposed to external attackers. There is no authentication, network service, or protocol involved - the attack surface is entirely the model-loading code path.

Impact

The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H) scores 8.6, reflecting a locally-delivered attack with no privileges or user interaction required beyond the normal invocation of Tesseract with a model file. The local attack vector correctly limits scope to environments where an attacker can supply or replace a .traineddata file - this is realistic in OCR-as-a-service pipelines accepting user-supplied models, CI document processing, or multi-tenant systems sharing a model directory. The PR:N classification is accurate because Tesseract itself has no authentication gating model loading. No EPSS data is provided, no CISA KEV listing exists, and no public exploit code has been identified, so real-world exploitation risk is currently theoretical. The 'potentially controlled corruption' language in the advisory is an honest assessment of heap-write primitives - RCE is plausible but not demonstrated. The most significant risk amplifier is the absence of a released patch, leaving all 5.5.3-and-earlier deployments unmitigated until a tagged release is cut.

Exploit ScenarioDerived

An attacker operating a document processing service that accepts user-specified language model files uploads a crafted .traineddata containing an NT_LSTM layer whose CI gate matrix has dim1 (i.e., ns_) set to a value much larger than the na_ field in the layer header. When Tesseract processes any document using this model, LSTM::Forward allocates source_ for na_ elements and then calls WriteTimeStepPart writing ns_ elements, overflowing the heap buffer; with a controlled heap layout this may achieve arbitrary code execution in the Tesseract worker process.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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 – Sep 10, 2026

Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls a crafted .traineddata model file to corrupt heap memory during LSTM inference, leading to a crash or potentially controlled code execution. The root cause is an inconsistency between source_ (sized from deserialized na_) and the write count used by WriteTimeStepPart and AddTimeStepPart (driven by ns_ from the CI gate WeightMatrix dim1), leaving two functions unbounded after prior hardening patched sibling routines. No fixed release is available at time of analysis; an upstream fix exists only as a commit. No public exploit identified at time of analysis.

RemediationAI

No vendor-released patch is available at time of analysis. An upstream fix is present in commit b494ac18925f9d9aff9ef5815475de9943ab19bf (https://github.com/tesseract-ocr/tesseract/commit/b494ac18925f9d9aff9ef5815475de9943ab19bf); operators who build Tesseract from source should apply this commit or build from HEAD. As compensating controls: restrict Tesseract model loading exclusively to internally-managed, pre-validated .traineddata files and reject any user-supplied model input at the application boundary - this eliminates the attack surface for external attackers entirely. Where model-file provenance cannot be guaranteed, run Tesseract in an isolated process or container with a restrictive seccomp profile and no write access to sensitive paths, so that heap corruption cannot escalate beyond the sandboxed process. Monitor the upstream repository for the next tagged release incorporating this fix.

Affected VersionsENISA

tesseract ≤ 5.5.3

Affected Packages

euvd tesseract no fix

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 deserializes neural network models from .traineddata files into C++ objects in src/lstm/lstm.cpp. During LSTM::Forward, the scratch buffer source_ is allocated using na_ (the activation-count field read directly from the serialized header), while WriteTimeStepPart and AddTimeStepPart in src/lstm/networkio.cpp write ns_ elements, where ns_ is derived from the deserialized CI gate WeightMatrix's Dim1() value. Because these two fields are deserialized independently with no cross-validation, a crafted NT_LSTM layer can set gate matrix dimensions to make ns_ arbitrarily larger than na_. This triggers a heap write past the end of source_ on the very first recognition step (CWE-787: Out-of-bounds Write). The fix in commit b494ac18 adds dimension-consistency checks to LSTM::DeSerialize and bounds assertions (ASSERT_HOST) to NetworkIO::AddTimeStep and NetworkIO::WriteTimeStep. Affected CPE: cpe:2.3:a:tesseract-ocr:tesseract:*:*:*:*:*:*:*:* (all versions through 5.5.3).

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 8.6 HIGH
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
vuln.today AI 8.4 HIGH

Crafted .traineddata requires local file delivery (AV:L) but no privileges or interaction; heap OOB write can corrupt full process memory affecting all CIA triad.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Tesseract is an open source OCR engine. In version 5.5.3 and earlier, prior .traineddata hardening added bounds checks to NetworkIO::CopyTimeStepGeneral and NetworkIO::Randomize in src/lstm/networkio.cpp but left NetworkIO::WriteTimeStepPart and NetworkIO::AddTimeStepPart unchecked. In LSTM::Forward in src/lstm/lstm.cpp, source_ is sized from the independently deserialized na_ field while the WriteTimeStepPart count is ns_, which comes from the CI gate WeightMatrix dim1() value. A crafted NT_LSTM layer can make ns_ much larger than na_, causing a heap out-of-bounds write during the first recognition step on the default LSTM engine and 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) in the LSTM inference path of libtesseract.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Tesseract OCR versions 5.5.3 and earlier contain a heap memory corruption vulnerability exploitable through malicious OCR model files, potentially enabling code execution on document processing systems. Organizations using Tesseract for batch document processing, form automation, or digitization services face compromise risk if untrusted .traineddata model files enter processing pipelines.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Implement interim mitigations: (1) cryptographically validate all .traineddata files against known-good signatures or hashes before processing; (2) execute OCR processes in sandboxed containers with restricted file system and network access; (3) enforce whitelist of approved, internally-maintained model file versions; (4) disable untrusted external model file uploads and consider disabling OCR entirely for external content sources if operationally feasible.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Medium
widely used open-source OCR engine in document processing pipelines
Social Media
1
Sightings
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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

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.

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

CVE-2026-119339 MEDIUM
5.5 Oct 30

Loading a crafted LSTM model into Tesseract OCR 5.5.3 and earlier aborts the host process on the default build configura

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Module for Package Hub 15 SP7 Affected

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