Description
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.
Published: 2026-09-10
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: Heap corruption that may lead to a crash or potential remote code execution
Action: Apply Fix
AI Analysis

Impact

Tesseract OCR contains a heap out‑of‑bounds write in LSTM::Forward caused by a mismatch between the na_ field and the gate‑matrix dimensions. A crafted NT_LSTM layer can set ns_ much larger than na_, writing past the allocated buffer during the first recognition step on the default LSTM engine. This corruption can cause a crash, foregrounded write‑corruption, and, if an attacker controls the affected model, could be leveraged to redirect control flow or otherwise execute arbitrary code. The CVSS score of 8.6 reflects the severity of the vulnerability.

Affected Systems

The weakness is present in Tesseract‑OCR version 5.5.3 and earlier. Users running these releases are at risk when an attacker can supply a custom LSTM model or .traineddata file that contains the vulnerable NT_LSTM layer.

Risk and Exploitability

The vulnerability is locally exploitable when Tesseract receives manipulated input; the attack surface is the ingestion of a crafted model or trained data file. No exploit in the wild is documented and EPSS data is unavailable, but the high CVSS score indicates substantial potential. The issue is not listed in CISA KEV, so it has not yet been widely catalogued. Until an official patch is released, the most effective risk mitigation is to avoid processing untrusted LSTM models or disable the default LSTM engine if possible. Once an update that addresses the bounds checking is issued, applying that update will eliminate the risk.

Generated by OpenCVE AI on September 10, 2026 at 18:10 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the most recent Tesseract release once a patch that resolves the bounds check issue is available
  • Configure Tesseract to avoid loading or executing the default LSTM engine when processing untrusted input, and restrict model files to trusted, signed sources
  • Enable or install runtime memory protection tools such as AddressSanitizer or other heap‑corruption detectors to catch potential exploitation during development and testing

Generated by OpenCVE AI on September 10, 2026 at 18:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 10 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 10 Sep 2026 16:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Tesseract: Heap out-of-bounds write in LSTM::Forward via na_/gate-matrix dimension mismatch
Weaknesses CWE-787
References
Metrics cvssV4_0

{'score': 8.6, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-10T17:13:02.365Z

Reserved: 2026-09-09T21:22:45.433Z

Link: CVE-2026-88049

cve-icon Vulnrichment

Updated: 2026-09-10T17:12:54.829Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-10T17:17:09.087

Modified: 2026-09-10T19:54:25.810

Link: CVE-2026-88049

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-10T18:15:06Z

Weaknesses