Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit RTL-script (Hebrew/Arabic) page image to OCR service
-
DeliveryPAGE XML renderer recognises right-to-left word
-
ExploitAppendLinePolygon double-frees caller-owned Pta accumulator
-
ExecutionptaJoin copies stale coordinates into RecalcPolygonline
-
ImpactHeap out-of-bounds read / crash (DoS) on affected allocators
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Two conditions must both hold. (1) The PAGE XML renderer must be active with polygon output - the shipped defaults page_xml_polygon=true and page_xml_level=0 are sufficient (the guard |
| Impact | Signals point to a genuine but moderate-priority memory-safety issue rather than an emergency. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:H, base 6.9) and the vuln.today decision label 'this_month' both place this below act_now/emergency urgency. No CISA KEV listing is present and no EPSS score was supplied, so there is no evidence of active or widespread exploitation. A detailed, deterministic AddressSanitizer reproduction exists in the vendor GHSA advisory, but the advisory itself states that exploitability beyond a crash was NOT demonstrated on glibc - on glibc release builds 50 runs exited cleanly because the freed 200-byte chunk is immediately re-handed to the next ptaCopy and the doubly-freed object is the leaked ptsd copy nothing reads. The real risk lives in the cases the advisory names explicitly: non-glibc allocators (musl, hardened_malloc, Windows debug CRT), long-running multi-threaded OCR services where another thread's allocation lands in the freed chunk between frees, or future builds that remove the leaked ptsd copy. The confirmed observable effect is a heap-buffer-overflow READ in RecalcPolygonline driven by corrupted coordinates (a 250 MB numaCreate followed by an out-of-bounds read), i.e. primarily a denial-of-service/robustness problem on right-to-left pages. Note a tension to verify: the input tags list 'Information Disclosure' and the vector marks VC:L, yet the advisory demonstrates only memory corruption/crash and explicitly declines to claim exploitation - treat confidentiality/code-execution impact as unproven, not confirmed. |
| Exploit ScenarioDerived | An attacker supplies an ordinary Hebrew or Arabic scanned page image to an OCR pipeline configured to emit PAGE XML with shipped defaults (page_xml_polygon true, page_xml_level 0); no network access or credentials are involved. As each recognised right-to-left word is processed, AppendLinePolygon frees the caller-owned accumulator and later reads and frees the same dangling pointer, producing a deterministic double free / use-after-free and feeding corrupted coordinates into RecalcPolygonline. A public PoC reference exists (the vendor advisory's AddressSanitizer reproduction on a benign Hebrew PNG); it is not verified as working exploit code, and code execution was not demonstrated on glibc. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Double free and use-after-free in the Tesseract OCR PAGE XML renderer (5.4.0 through 5.5.3) leaves the caller-owned right-to-left line-polygon accumulator (line_top_rtl_pts / line_bottom_rtl_pts) dangling, so a page containing Hebrew or Arabic words makes the renderer free the same heap object once per recognised RTL word and then join stale coordinates into the live line polygon. The bug fires deterministically under AddressSanitizer with the shipped defaults (page_xml_polygon=true, page_xml_level=0; one 1000x220 Hebrew page yields 19 sanitizer errors), and the corrupted extremes have been observed to reach RecalcPolygonline, producing a 250 MB allocation followed by an out-of-bounds read. On glibc release builds the same code executed cleanly for fifty runs, so observable impact depends on allocator behaviour and on concurrent allocation in a long-running multi-threaded OCR service; there is no KEV listing and no confirmed active exploitation, and the upstream advisory's sanitizer reproduction recipe is a public PoC reference that is not verified as working exploit code. Fixed in 5.5.4.
RemediationAI
Vendor-released patch: Tesseract 5.5.4 (https://github.com/tesseract-ocr/tesseract/releases/tag/5.5.4). The fix is carried by PR https://github.com/tesseract-ocr/tesseract/pull/4647 and commit https://github.com/tesseract-ocr/tesseract/commit/fa52414ff1fd13ae4b00048d2498f9141b0bc2eb, which change AppendLinePolygon to take the RTL accumulator as Pta ** so the caller's pointer is updated to a fresh PTA, pass &line_top_rtl_pts and &line_bottom_rtl_pts at the call sites, assign *pts_rtl = ptsd instead of the discarded ptaCopy, and add numaDestroy(&bin_line) plus a regression test (TesseractTest.PAGEXMLRightToLeftPolygon) that renders hebrew.png at page_xml_level 1. Because delivery is a locally processed attacker-supplied image and no patch exists for 5.4.0-5.5.3, interim mitigation is to stop emitting PAGE XML for documents from untrusted sources: if the pipeline uses tessedit_create_page_xml/page output, switch that job to hOCR, TSV or plain text, or run the PAGE XML path in a separate, short-lived, memory-limited worker so a corrupted allocation cannot affect other tenants; note that this keeps the underlying ownership bug in place, so any other consumer of the same process still runs unfixed code, and the release-build behaviour on glibc was benign in testing, meaning a crash-free run does not prove the flaw was not reached. Operators who cannot upgrade should also avoid multi-threaded in-process reuse of a TessBaseAPI across documents, since a concurrent allocation landing between the two frees is the scenario the advisory identifies as the most likely path to observable corruption.
Affected VersionsENISA
Affected Packages
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
The PAGE XML renderer introduced in commit 577e8a8b (PR #4214, April 2024) builds line polygons from Leptonica PTA point arrays. AppendLinePolygon in src/api/pagerenderer.cpp takes the RTL accumulator by value as Pta *pts_rtl; in the right-to-left branch it calls ptaDestroy(&pts_rtl), which frees the allocation and nulls only the callee's local copy, while the caller keeps the now-dangling pointer because neither call site at lines 935 and 937 reassigns it. The same ownership error exists in the left-to-right branch's DestroyAndCreatePta call, whose return value is discarded; the RTL branch also leaks its ptsd copy at line 349 and never actually accumulates RTL word polygons. Both call sites sit inside the guard if (LEVELFLAG > 0 || (POLYGONFLAG && !skewed_flag)) at line 929, which is satisfied by the shipped defaults on an upright page, and end-of-line code at lines 1004-1010 reads the freed struct through ptaGetCount and ptaJoin and frees it again. The primary mapped CWE is CWE-125 (out-of-bounds read), with the advisory also classifying CWE-415 (double free) and CWE-416 (use after free): RecalcPolygonline sizes its bin array from the coordinate range of the polygon it is given, so stale coordinates copied by ptaJoin produced a 250 MB numaCreate and an out-of-bounds access to bin_line->array, which is written directly rather than through numaSetValue and therefore carries no Leptonica bounds check. A Latin left-to-right page is the negative control with zero errors, confirming the RTL branch as the trigger; the assessed vector is local (AV:L) with user interaction (UI:R), no privileges required, and limited confidentiality/integrity plus high availability impact.
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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
Attacker supplies a local document an operator processes (AV:L, UI:R, PR:N); the free fires unconditionally on any RTL page (AC:L); confirmed effect is a crash/DoS (A:H) with only unproven, limited C/I impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Tesseract is an open source OCR engine. From 5.4.0 until 5.5.4, AppendLinePolygon in src/api/pagerenderer.cpp destroys the caller-owned right-to-left Pta accumulator while receiving it by value, leaving line_top_rtl_pts and line_bottom_rtl_pts dangling. On an upright Hebrew or Arabic page at the default PAGE XML level, POLYGONFLAG with a false skewed_flag enters the vulnerable calls, while LEVELFLAG greater than zero provides an alternative gate. The calls repeatedly read and free the stale object, causing a double free and use after free and allowing corrupted coordinates to reach RecalcPolygonline. This issue is fixed in version 5.5.4.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
An issue in the Leptonica linked library (v1.79.0) allows attackers to cause an arithmetic exception leading to a Denial
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls a crafted `.traineddata` mod
Heap out-of-bounds write and read in Tesseract OCR Engine 5.5.3 and earlier allows an attacker who can supply a crafted
Stack-based buffer overflow in Tesseract OCR 5.5.3 and earlier corrupts the stack during legacy engine initialization, e
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who supplies a crafted .traineddata langu
Heap out-of-bounds write in Tesseract OCR 5.5.3 and earlier allows an attacker who controls the loaded .traineddata mode
Heap corruption in Tesseract OCR 5.5.3 and earlier allows an attacker who can supply a malicious unicharset file to corr
Out-of-bounds write in Tesseract OCR engine version 5.5.3 and earlier allows an attacker who can supply a crafted `.trai
Denial of service in Tesseract OCR Engine 5.5.3 and earlier allows a local attacker to crash any process that loads a cr
Heap out-of-bounds write in Tesseract OCR engine prior to 5.5.3 is triggered by a crafted LSTM .traineddata model file t
Heap out-of-bounds read in Tesseract OCR prior to version 5.5.3 allows an attacker who can supply a crafted .traineddata
Loading a crafted LSTM model into Tesseract OCR 5.5.3 and earlier aborts the host process on the default build configura
EUVD-2026-114445
NVD
CVE.org
EPSS
GitHub
Exploit-DB