Description
Tesseract is an open source OCR engine. Prior to 5.5.4, GENERIC_2D_ARRAY::DeSerializeSize in src/ccstruct/matrix.h reads matrix dimensions as signed int32_t values and compares them only with UINT16_MAX, allowing negative values to reach ResizeNoInit. Negative dimensions or a 65535 by 65535 product can create inconsistent allocation state and later out-of-bounds accesses while loading a crafted traineddata file, causing denial of service. This issue is fixed in version 5.5.4.
Published: 2026-10-30
Score: 5.5 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Patch Now
AI Analysis

Impact

Tesseract's GENERIC_2D_ARRAY::DeSerializeSize function reads matrix dimensions as signed 32‑bit integers and then compares the value only against UINT16_MAX. This allows a negative number or any value up to 65535 to pass the comparison, which enables the downstream ResizeNoInit builder to allocate memory based on these incorrect dimensions. When a crafted traineddata file is processed, the resulting inconsistent allocation state can cause out‑of‑bounds memory accesses later in the loading pipeline, leading to application crashes and denial of service.

Affected Systems

The vulnerability affects the open‑source OCR engine Tesseract, specifically all releases before 5.5.4. Users running 5.5.2, 5.5.3, or earlier are potentially affected.

Risk and Exploitability

The CVSS score of 5.5 indicates a moderate risk, and the EPSS score is not currently available. The vulnerability is not listed in the CISA KEV catalog. Attacks require an adversary to supply a malicious traineddata file that Tesseract processes, which may occur through local file injection or if the OCR engine is exposed to external data sources. Because the flaw leads only to denial of service rather than arbitrary code execution, the threat surface is limited to availability impact but remains significant for services relying on stable OCR processing.

Generated by OpenCVE AI on October 30, 2026 at 21:38 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Tesseract to version 5.5.4 or newer, which includes the fix for the signed integer comparison issue.
  • If an upgrade is not feasible, restrict access to the folder containing traineddata files and ensure only trusted users can place files there, thereby preventing attackers from introducing malicious data.
  • Validate the origin of traineddata files before loading, rejecting any that are not signed or verified by a trusted source.

Generated by OpenCVE AI on October 30, 2026 at 21:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 30 Oct 2026 22:30:00 +0000

Type Values Removed Values Added
First Time appeared Tesseract-ocr
Tesseract-ocr tesseract Ocr
Vendors & Products Tesseract-ocr
Tesseract-ocr tesseract Ocr

Fri, 30 Oct 2026 20:30:00 +0000

Type Values Removed Values Added
Description Tesseract is an open source OCR engine. Prior to 5.5.4, GENERIC_2D_ARRAY::DeSerializeSize in src/ccstruct/matrix.h reads matrix dimensions as signed int32_t values and compares them only with UINT16_MAX, allowing negative values to reach ResizeNoInit. Negative dimensions or a 65535 by 65535 product can create inconsistent allocation state and later out-of-bounds accesses while loading a crafted traineddata file, causing denial of service. This issue is fixed in version 5.5.4.
Title Tesseract: GENERIC_2D_ARRAY DeSerializeSize signed integer comparison bypass allows negative dimensions
Weaknesses CWE-190
CWE-681
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}


Subscriptions

Tesseract-ocr Tesseract Ocr
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-30T20:22:46.387Z

Reserved: 2026-10-29T20:44:30.286Z

Link: CVE-2026-119340

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-30T21:16:52.080

Modified: 2026-10-30T21:16:52.080

Link: CVE-2026-119340

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T22:15:14Z

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

  • CWE-681

    Incorrect Conversion between Numeric Types