Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft unicharset file with duplicate character entries
-
DeliveryDeliver to Tesseract processing endpoint or pipeline
-
ExploitEngine parses file via load_via_fgets
-
Executionid index desynchronizes from unichars vector size
-
PersistOut-of-bounds write to UNICHAR_PROPERTIES on heap
-
ImpactHeap 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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 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
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
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.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
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
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.
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
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
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
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
Loading a crafted LSTM model into Tesseract OCR 5.5.3 and earlier aborts the host process on the default build configura
Same weakness CWE-129 – Improper Validation of Array Index
View allSame technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP7 | Affected |
EUVD-2026-75629
NVD
CVE.org
EPSS
GitHub
Exploit-DB