Tesseract: Double free and use after free in the PAGE XML renderer on right-to-left pages
Impact
Tesseract versions 5.4.0 to 5.5.3 have a double free and use after free weakness in the PAGE XML renderer on right-to-left pages, potentially causing corrupted coordinates. The issue occurs when processing upright Hebrew or Arabic pages. It is fixed in version 5.5.4.
Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
tesseract-ocr · GitHub_M
tesseract
1 range
tesseract-ocr · GitHub_M
tesseract
Compare with this publisher’s ranges. This does not inspect your installation.
affected
>= 5.4.0, < 5.5.4
Other versions: unknown
Original source description
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.
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-119338View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 1
Assigning organization
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.