Skip to main content

Tesseract OCR CVE-2026-88052

| EUVDEUVD-2026-75629 HIGH
Improper Validation of Array Index (CWE-129)
2026-09-10 GitHub_M
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft unicharset file with duplicate character entries
  2. Delivery
    Deliver to Tesseract processing endpoint or pipeline
  3. Exploit
    Engine parses file via load_via_fgets
  4. Execution
    id index desynchronizes from unichars vector size
  5. Persist
    Out-of-bounds write to UNICHAR_PROPERTIES on heap
  6. Impact
    Heap corruption triggers crash or code execution

Vulnerability Assessment

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

Exploitation requires a Tesseract process to call load_via_fgets on an attacker-controlled unicharset file containing either a duplicate character representation (same glyph appearing more than once), an empty representation, or an already-encodable representation that causes unichar_insert_backwards_compatible to perform a no-op insertion. In a direct interactive scenario, a user must be induced to invoke Tesseract against the malicious file (CVSS UI:R). In automated pipeline scenarios where an application ingests documents from untrusted sources and the associated unicharset files can be influenced - for example, document format parsers that extract embedded character tables, or pipelines that fetch tessdata from user-specified URIs - the user-interaction requirement is satisfied by the pipeline's own processing logic, effectively converting the attack surface to network-reachable. Deployments using only official, integrity-verified tessdata unicharset files from the tesseract-ocr distribution are not exploitable in the default configuration, provided those files have not been tampered with. No authentication or elevated privilege is required to pass a file to Tesseract for processing.

Impact

The CVSS 7.8 score with AV:L/AC:L/PR:N/UI:R accurately characterizes this as a client-side file-processing vulnerability; exploitation requires a Tesseract process to actually load a crafted unicharset file, either via direct user invocation or an automated document-processing pipeline. No CISA KEV listing and no EPSS score are available in the provided data, so exploitation probability cannot be quantitatively benchmarked, and there is no public exploit identified at time of analysis. That said, the fix commit's embedded test cases provide a precise, minimal reproduction: a three-entry file with a duplicate representation is sufficient to trigger the out-of-bounds write, meaning the technical barrier to constructing a triggering payload is low. The absence of a released patched version is a meaningful risk amplifier - even a mid-sized municipal IT team in sopot running automated OCR workflows cannot upgrade to a clean release and must instead apply a source patch or deploy compensating controls. Applications that automatically ingest documents from untrusted sources and pass them to Tesseract effectively transform the AV:L/UI:R vector into a network-reachable attack surface, raising real-world risk materially above what the base CVSS suggests for interactive use.

Exploit ScenarioDerived

An attacker crafts a unicharset file declaring three characters but listing the first character ('A') twice - exactly the structure demonstrated in the fix commit's test case RejectsDuplicateRepresentation. When an automated OCR pipeline ingests a document whose associated or embedded unicharset file has been substituted with this malformed version, Tesseract's load_via_fgets increments id past the actual unichars vector size, and the subsequent write to unichars[2].properties.enabled corrupts heap metadata, triggering either an immediate crash of the OCR worker or, with heap-grooming effort, a controlled write primitive for code execution.

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

Heap corruption in Tesseract OCR 5.5.3 and earlier allows an attacker who can supply a malicious unicharset file to corrupt application heap memory during OCR engine initialization, potentially leading to a crash or controlled code execution. The root cause is that UNICHARSET::load_via_fgets treats the declared character count as a trusted loop bound and uses the incrementing id variable as a direct unichars vector index, while unichar_insert_backwards_compatible silently performs no-op insertions for duplicate or empty representations - causing id to exceed unichars.size() and subsequent set_* writes to access memory beyond the vector. No patched release is available as of this review; only an upstream source commit fix exists.

RemediationAI

No vendor-released patched version is available as of this review; the upstream fix exists only as source commit 2d04d640db2e8c7e3bab2369d599343b5a8b8443 on GitHub. Organizations requiring a fix should backport the two guards from that commit to their local build: the non-positive size rejection at function entry and the post-insert size() == id+1 desynchronization check in load_via_fgets. As a compensating control, restrict Tesseract to processing only unicharset files sourced from official tessdata distributions under integrity-controlled storage; avoid pipelines that allow externally supplied or user-uploaded unicharset files to reach the engine. For automated document ingestion services, sandbox the Tesseract process using seccomp profiles, namespaces, or container isolation to limit heap-corruption blast radius to the OCR worker process. Monitor https://github.com/tesseract-ocr/tesseract/security/advisories/GHSA-2hm8-q5c7-c373 for an official release incorporating the patch.

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 UNICHARSET class is responsible for loading the character-encoding tables that both the LSTM (default) and legacy OCR engines rely on during initialization. The vulnerable function load_via_fgets in src/ccutil/unicharset.cpp reads a flat text unicharset file, trusting the file-declared count as a loop bound and using the incrementing variable id as a direct index into the unichars vector. CWE-129 (Improper Validation of Array Index) is the precise root cause: unichar_insert_backwards_compatible may silently leave the vector unmodified for a duplicate character representation or an empty or already-encodable string, so id increments past the actual vector size without any post-insert bounds check. The subsequent set_* property-setting calls and the direct write to unichars[id].properties.enabled then address heap memory beyond the vector's allocated storage, producing heap corruption. The upstream fix (commit 2d04d640db2e8c7e3bab2369d599343b5a8b8443) adds two guards: rejecting non-positive unicharset_size values at function entry, and verifying that size() == id+1 after each insertion to detect desynchronization and reject the malformed file. The CPE cpe:2.3:a:tesseract-ocr:tesseract:*:*:*:*:*:*:*:* covers 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 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Local attack vector because exploitation requires loading a crafted file into the process; UI:R because the file must be processed by a user or pipeline action; PR:N since no authenticated session is needed to supply the file.

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

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
High
Integrity
High
Availability
High

DescriptionCVE.org

Tesseract is an open source OCR engine. In version 5.5.3 and earlier, UNICHARSET::load_via_fgets in src/ccutil/unicharset.cpp trusts the declared unichar count as a loop bound and uses id as an unchecked index into the unichars vector. unichar_insert_backwards_compatible can leave the vector unchanged for an empty, duplicate, or already-encodable representation, causing id to become larger than unichars.size(). Subsequent set_* calls and the write to unichars[id].properties.enabled then write UNICHAR_PROPERTIES beyond the vector during initialization in both the default LSTM and legacy engines, causing heap corruption, a crash, or potentially controlled corruption. No fixed release is available as of this review.

Technical POC Analysis

Class: CWE-129 (Improper Validation of Array Index), manifesting as 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

Why It Matters

Tesseract OCR versions 5.5.3 and earlier contain a heap corruption vulnerability exploitable via malicious unicharset files supplied during document processing, potentially causing application crashes or code execution. Organizations using Tesseract for document scanning, data extraction, accessibility features, or automated form processing face operational disruption and potential compromise; no vendor patch is currently available.

Business Impact: High
Compensating Controls

Since no vendor-released patch is identified at time of analysis, enforce strict unicharset input controls: maintain a cryptographic whitelist of approved unicharset files, block all custom unicharset uploads from external sources, and run OCR processes in resource-limited containers to minimize blast radius of crashes. Implement process-level monitoring and alerting for OCR worker terminations. Segment high-risk document processing workflows into isolated infrastructure and consider temporary routing of sensitive documents through alternative OCR engines until patches are released and validated.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
widely used open-source OCR engine across document processing pipelines
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 HIGH
CISA KEV No
Public POC No
EPSS 0.1%
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
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-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