Skip to main content

Tesseract OCR CVE-2026-88047

| EUVDEUVD-2026-75590 HIGH
Stack-based Buffer Overflow (CWE-121)
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
    Place crafted .traineddata file in application load path
  2. Delivery
    Application calls TessBaseAPI::Init with legacy engine
  3. Exploit
    ReadNormProtos parses NORMPROTO component
  4. Execution
    99-char token extracted into 61-byte stack buffer without width limit
  5. Persist
    Stack corruption overwrites up to 39 bytes past buffer
  6. Impact
    Control-flow hijack or process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
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 attacker to control or substitute the .traineddata training data file passed to TessBaseAPI::Init. This file must be processed by Tesseract's legacy OCR engine specifically - the LSTM-based engine does not invoke ReadNormProtos and is not affected. The application must be compiled against libstdc++; builds using Apple's libc++ C++20 are incidentally protected by the bounded array overload. No system-level authentication or privileges are required - the attacker only needs a path to place the crafted file where the application will load it. Applications that load only system-installed, package-manager-distributed training data from trusted sources are not realistically exploitable.

Impact

The CVSS 4.0 score of 8.6 (AV:L/AC:L/AT:N/PR:N/UI:N) reflects low attack complexity and high impact potential but a local attack vector requiring control of the .traineddata file. Real-world risk is strongly deployment-dependent: applications accepting user-supplied OCR language packs face meaningful exposure, while those loading only system-installed, package-manager-distributed training data face negligible risk. No EPSS data is provided and the vulnerability does not appear in CISA KEV, indicating no confirmed active exploitation. No public exploit code exists beyond the fix commit's regression test case. The CVSS 4.0 vector's UI:N metric may overstate accessibility - in most deployments, a user or operator must initiate OCR processing, implying active user interaction. The legacy engine dependency is an important limiting factor: applications using only the LSTM-based engine are entirely unaffected. Platform heterogeneity is a key differentiator: Linux libstdc++ builds are vulnerable while macOS Apple libc++ C++20 builds are incidentally protected.

Exploit ScenarioDerived

An attacker who can supply or substitute a .traineddata file - for example by exploiting a file-upload path in a document processing application or social-engineering a user into loading a custom language pack - crafts the NORMPROTO component with a unichar token exceeding 60 characters. When the target application calls TessBaseAPI::Init with the legacy engine using that file, ReadNormProtos overflows the unichar stack buffer by up to 39 bytes, potentially overwriting the saved return address to redirect execution to attacker-controlled code. No public exploit code exists at time of analysis, but the fix commit's regression test (normproto_test.cc) explicitly demonstrates the overflow condition using a 99-character token.

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

Stack-based buffer overflow in Tesseract OCR 5.5.3 and earlier corrupts the stack during legacy engine initialization, enabling denial of service and potential control-flow hijacking when a crafted .traineddata file is processed. The flaw originates in Classify::ReadNormProtos (normmatch.cpp), where unbounded std::istream::operator>>(char*) extraction into a fixed 61-byte stack buffer allows a 99-character NORMPROTO token to overwrite up to 39 bytes beyond the buffer boundary during TessBaseAPI::Init. No fixed release is available at time of analysis; an upstream fix commit exists but has not been tagged as a release, and no public exploit has been identified at time of analysis.

RemediationAI

No vendor-released patched version is available at time of analysis. An upstream fix commit (1bda5079b1c8a7e25f523486837426903d29ce84) is available in the tesseract-ocr/tesseract repository; organizations building from source should apply this patch, which adds std::setw(2 * UNICHAR_LEN + 1) to bound stream extraction in Classify::ReadNormProtos. Until a tagged release is available, the primary compensating control is ensuring only trusted, system-installed .traineddata files are passed to TessBaseAPI::Init - reject or sandbox any user-supplied or third-party training data. Running Tesseract in a sandboxed container or process with restricted filesystem access limits the blast radius if exploitation occurs. On macOS, building against Apple's libc++ C++20 provides incidental protection. Monitor GitHub Advisory GHSA-5j2p-r5vc-q7f3 for a patched release announcement.

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 OCR (cpe:2.3:a:tesseract-ocr:tesseract) uses .traineddata binary files containing a NORMPROTO component for normalization prototypes. During legacy engine initialization via TessBaseAPI::Init, Classify::ReadNormProtos in src/classify/normmatch.cpp reads this component using std::istream::operator>>(char*) on a raw char* buffer without specifying a stream width via std::setw. In C++, this overload has no intrinsic length limit and reads until whitespace or EOF regardless of buffer size. The unichar stack buffer is 2 * UNICHAR_LEN + 1 bytes (approximately 61 bytes per the fix diff), while the line buffer accommodates tokens up to 99 characters, yielding up to 39 bytes of uncontrolled stack corruption (CWE-121). The upstream fix applies std::setw(2 * UNICHAR_LEN + 1) to bound extraction in stream >> std::setw(2 * UNICHAR_LEN + 1) >> unichar >> NumProtos. Apple's libc++ C++20 provides a bounded-array overload of operator>> that incidentally prevents the overflow; libstdc++ (default on Linux) does not implement this protection, leaving those builds fully exposed.

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

Requires attacker-controlled .traineddata file in load path (AV:L, PR:N); user or application must initiate OCR processing to trigger (UI:R); full stack corruption enables C/I/A:H.

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 8.4 HIGH
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.4 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, Classify::ReadNormProtos in src/classify/normmatch.cpp parses the NORMPROTO component of a .traineddata file and uses std::istream::operator>>(char*) to extract a whitespace-delimited token into a fixed 61-byte stack buffer without setting a stream width. The 100-byte line buffer can carry a token of up to 99 characters, so a token longer than 60 characters writes up to 39 attacker-controlled bytes past the buffer during TessBaseAPI::Init of the legacy engine, causing stack corruption, denial of service, and potentially control-flow hijacking on affected standard-library implementations. Builds using Apple's libc++ C++20 bounded array overload are incidentally protected, while typical libstdc++ builds remain affected. No fixed release is available as of this review.

Technical POC Analysis

CWE-121 stack-based buffer overflow in Classify::ReadNormProtos, src/classify/normmatch.cpp:174 (tesseract-ocr/tesseract).

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

An unpatched vulnerability in Tesseract OCR affects thousands of organizations processing documents through automated scanning systems, with potential to cause service disruptions or compromise system security. The flaw allows attackers to craft malicious training data files that can crash processing services or gain unauthorized access to systems running vulnerable versions through 5.5.3. With no vendor patch available, affected organizations face indefinite exposure and must implement interim protective measures immediately.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict .traineddata file uploads to pre-approved, trusted sources only; (2) Disable legacy engine initialization if not operationally required; (3) Isolate Tesseract processes in low-privilege containers or security contexts with no network access; (4) Implement file-type validation and refuse processing of files from untrusted origins; (5) Monitor upstream Tesseract project and deploy pending fix immediately upon release after validation testing.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
widely used open-source OCR library in document processing pipelines
Social Media
1
Sightings
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

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.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

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