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.
OpenCVE Enrichment