Impact
Tesseract’s AppendLinePolygon function, when invoked on right‑to‑left pages, incorrectly destroys a caller‑owned polygon accumulator by passing it by value. The resulting dangling references are repeatedly read and freed, producing a double free and use after free. This corruption can propagate corrupted polygon coordinates into the RecalcPolygonline routine, causing memory corruption within the OCR engine. The vulnerability does not grant remote code execution directly, but it can lead to crashes, data loss, or unintended behavior in the process using the engine.
Affected Systems
The flaw exists in tesseract‑ocr:tesseract releases from version 5.4.0 through 5.5.4 inclusive. All builds that process right‑to‑left languages such as Hebrew or Arabic and that employ the default PAGE XML level are impacted. The problem was resolved in the 5.5.4 release and later versions.
Risk and Exploitability
The CVSS score of 6.9 indicates a moderately severe vulnerability. EPSS data is not available, and the vulnerability is not listed in CISA’s KEV catalog, suggesting no known active exploits. The attack vector requires an attacker to supply a crafted PAGE XML document that activates the vulnerable code path. Although the path is limited to specific cultural and layout settings, the lack of a public exploit reduces the immediate threat, yet any use of the vulnerable library with uncontrolled XML input warrants containment.
OpenCVE Enrichment